diff --git a/packages/builder/cypress/integration/revertApp.spec.js b/packages/builder/cypress/integration/revertApp.spec.js index 58d51fa5b9..93501ab972 100644 --- a/packages/builder/cypress/integration/revertApp.spec.js +++ b/packages/builder/cypress/integration/revertApp.spec.js @@ -11,7 +11,7 @@ filterTests(['smoke', 'all'], () => { it("should try to revert an unpublished app", () => { // Click revert icon cy.get(interact.TOP_RIGHT_NAV).within(() => { - cy.get("[aria-label='Revert']").click({ force: true }) + cy.get(interact.AREA_LABEL_REVERT).click({ force: true }) }) cy.get(interact.SPECTRUM_MODAL).within(() => { // Enter app name before revert @@ -45,7 +45,7 @@ filterTests(['smoke', 'all'], () => { cy.addComponent("Elements", "Button") // Click Revert cy.get(interact.TOP_RIGHT_NAV).within(() => { - cy.get("[aria-label='Revert']").click({ force: true }) + cy.get(interact.AREA_LABEL_REVERT).click({ force: true }) }) cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => { // Click Revert @@ -61,8 +61,8 @@ filterTests(['smoke', 'all'], () => { it("should enter incorrect app name when reverting", () => { // Click Revert - cy.get(".toprightnav").within(() => { - cy.get("[aria-label='Revert']").click({ force: true }) + cy.get(interact.TOP_RIGHT_NAV).within(() => { + cy.get(interact.AREA_LABEL_REVERT).click({ force: true }) }) // Enter incorrect app name cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => { diff --git a/packages/builder/cypress/support/interact.js b/packages/builder/cypress/support/interact.js index 21ca9ce001..f0fae61660 100644 --- a/packages/builder/cypress/support/interact.js +++ b/packages/builder/cypress/support/interact.js @@ -110,7 +110,7 @@ export const SPECTRUM_MENU_ITEM_LABEL = ".spectrum-Menu-itemLabel" //revertApp export const TOP_RIGHT_NAV = ".toprightnav" -export const AREA_LAVEL_REVERT = "[aria-label=Revert]" +export const AREA_LABEL_REVERT = "[aria-label=Revert]" export const ROOT = ".root" //quertLevelTransformers