Skip to content

Commit adcb31d

Browse files
authored
Merge pull request #7265 from microting/copilot/fix-color-picking-cypress
Fix Cypress color picker to use button clicks instead of non-existent dropdown
2 parents 2f6d495 + f1e729e commit adcb31d

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,8 @@ describe('Visual editor - Create eForm', () => {
170170
cy.get('#changeFieldSaveBtn').click();
171171
cy.wait(1000);
172172

173-
// Change field color to red
174-
cy.get('#fieldSection0 #editBtn').click();
175-
cy.get('#fieldColorSelector input').clear().type('Red');
176-
selectValueInNgSelectorNoSelector('Red');
177-
cy.get('#changeFieldSaveBtn').click();
173+
// Change field color to red by clicking the red color button (5th button, index 4)
174+
cy.get('#fieldSection0 #colors button').eq(4).click();
178175
cy.wait(1000);
179176

180177
// Save the eForm
@@ -320,11 +317,8 @@ describe('Visual editor - Create eForm', () => {
320317
cy.get('#changeFieldSaveBtn').click();
321318
cy.wait(1000);
322319

323-
// Change nested field color to red
324-
cy.get('#fields_0 #fieldSection0 #editBtn').click();
325-
cy.get('#fieldColorSelector input').clear().type('Red');
326-
selectValueInNgSelectorNoSelector('Red');
327-
cy.get('#changeFieldSaveBtn').click();
320+
// Change nested field color to red by clicking the red color button (5th button, index 4)
321+
cy.get('#fields_0 #fieldSection0 #colors button').eq(4).click();
328322
cy.wait(1000);
329323

330324
// Make a copy of the nested field
@@ -383,11 +377,8 @@ describe('Visual editor - Create eForm', () => {
383377
cy.get('#changeFieldSaveBtn').click();
384378
cy.wait(1000);
385379

386-
// Change nested field color
387-
cy.get('#fields_0 #fieldSection0 #editBtn').click();
388-
cy.get('#fieldColorSelector input').clear().type('Red');
389-
selectValueInNgSelectorNoSelector('Red');
390-
cy.get('#changeFieldSaveBtn').click();
380+
// Change nested field color to red by clicking the red color button (5th button, index 4)
381+
cy.get('#fields_0 #fieldSection0 #colors button').eq(4).click();
391382
cy.wait(1000);
392383

393384
// Make a copy of the nested field

0 commit comments

Comments
 (0)