Skip to content

Commit 79e7431

Browse files
committed
Fixing more color checks.
1 parent adcb31d commit 79e7431

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

eform-client/cypress/e2e/j/eform-visual-editor.create-eform.spec.cy.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)