From 58241c3ecbdb1e53aa244c6456fabb952bca9598 Mon Sep 17 00:00:00 2001 From: MihailHadzhiev2022 Date: Mon, 13 Jun 2022 13:10:11 +0300 Subject: [PATCH] refactoring reverApp --- packages/builder/cypress/integration/revertApp.spec.js | 8 ++++---- packages/builder/cypress/support/interact.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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