From 7a2037410fbb4d79996c6fdb90a3ea5a78d697c2 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 10 May 2022 22:40:27 +0100 Subject: [PATCH] Cypress test fixes --- packages/builder/cypress/integration/createScreen.js | 2 +- packages/builder/cypress/integration/revertApp.spec.js | 3 +++ packages/builder/cypress/support/commands.js | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/createScreen.js b/packages/builder/cypress/integration/createScreen.js index ae10577ff0..94a827f26f 100644 --- a/packages/builder/cypress/integration/createScreen.js +++ b/packages/builder/cypress/integration/createScreen.js @@ -9,7 +9,7 @@ filterTests(["smoke", "all"], () => { }) it("Should successfully create a screen", () => { - cy.createScreen("/test") + cy.createScreen("test") cy.get(".nav-items-container").within(() => { cy.contains("/test").should("exist") }) diff --git a/packages/builder/cypress/integration/revertApp.spec.js b/packages/builder/cypress/integration/revertApp.spec.js index 9d5e4f0f63..01d5a04981 100644 --- a/packages/builder/cypress/integration/revertApp.spec.js +++ b/packages/builder/cypress/integration/revertApp.spec.js @@ -26,6 +26,8 @@ filterTests(['smoke', 'all'], () => { }) it("should revert a published app", () => { + cy.navigateToFrontend() + // Add initial component - Paragraph cy.addComponent("Elements", "Paragraph") // Publish app @@ -37,6 +39,7 @@ filterTests(['smoke', 'all'], () => { cy.get(".spectrum-ButtonGroup").within(() => { cy.get(".spectrum-Button").contains("Done").click({ force: true }) }) + // Add second component - Button cy.addComponent("Elements", "Button") // Click Revert diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index ce1fe2ec50..9f3b14a413 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -145,7 +145,6 @@ Cypress.Commands.add("createTestApp", () => { const appName = "Cypress Tests" cy.deleteApp(appName) cy.createApp(appName, "This app is used for Cypress testing.") - cy.createScreen("home") }) Cypress.Commands.add("createTestTableWithData", () => {