@@ -195,7 +195,9 @@ describe('Visual editor - Create eForm', () => {
195195 cy . get ( '#fieldSection0' ) . should ( 'exist' ) ;
196196 cy . get ( '#fieldSection0' ) . should ( 'contain' , fieldName ) ;
197197 // Verify color by checking the field has the red color class or styling
198- cy . get ( '#fieldSection0 .field-color-red' ) . should ( 'exist' ) ;
198+ // cy.get('#fieldSection0 .field-color-red').should('exist');
199+ // check the style attribyte for background-color to be background-color: rgb(255, 228, 228);
200+ cy . get ( '#fieldSection0 > div > div' ) . should ( 'have.attr' , 'style' ) . and ( 'include' , 'background-color: rgb(255, 228, 228)' ) ;
199201 } ) ;
200202
201203 it ( 'should create visual template with one numberField' , ( ) => {
@@ -345,8 +347,8 @@ describe('Visual editor - Create eForm', () => {
345347 // Verify both nested fields exist with red color
346348 cy . get ( '#fields_0 #fieldSection0' ) . should ( 'contain' , nestedFieldName ) ;
347349 cy . get ( '#fields_0 #fieldSection1' ) . should ( 'contain' , nestedFieldName ) ;
348- cy . get ( '#fields_0 # fieldSection0 .field-color-red ' ) . should ( 'exist ' ) ;
349- cy . get ( '#fields_0 # fieldSection1 .field-color-red ' ) . should ( 'exist ' ) ;
350+ cy . get ( '#fieldSection0 > div > div ' ) . should ( 'have.attr' , 'style' ) . and ( 'include' , 'background-color: rgb(255, 228, 228) ') ;
351+ cy . get ( '#fieldSection1 > div > div ' ) . should ( 'have.attr' , 'style' ) . and ( 'include' , 'background-color: rgb(255, 228, 228) ') ;
350352 } ) ;
351353
352354 it ( 'should create visual template and delete field' , ( ) => {
0 commit comments