Cypress test fixes

This commit is contained in:
Dean 2022-05-10 22:40:27 +01:00
parent 8f09591368
commit 7a2037410f
3 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ filterTests(["smoke", "all"], () => {
}) })
it("Should successfully create a screen", () => { it("Should successfully create a screen", () => {
cy.createScreen("/test") cy.createScreen("test")
cy.get(".nav-items-container").within(() => { cy.get(".nav-items-container").within(() => {
cy.contains("/test").should("exist") cy.contains("/test").should("exist")
}) })

View File

@ -26,6 +26,8 @@ filterTests(['smoke', 'all'], () => {
}) })
it("should revert a published app", () => { it("should revert a published app", () => {
cy.navigateToFrontend()
// Add initial component - Paragraph // Add initial component - Paragraph
cy.addComponent("Elements", "Paragraph") cy.addComponent("Elements", "Paragraph")
// Publish app // Publish app
@ -37,6 +39,7 @@ filterTests(['smoke', 'all'], () => {
cy.get(".spectrum-ButtonGroup").within(() => { cy.get(".spectrum-ButtonGroup").within(() => {
cy.get(".spectrum-Button").contains("Done").click({ force: true }) cy.get(".spectrum-Button").contains("Done").click({ force: true })
}) })
// Add second component - Button // Add second component - Button
cy.addComponent("Elements", "Button") cy.addComponent("Elements", "Button")
// Click Revert // Click Revert

View File

@ -145,7 +145,6 @@ Cypress.Commands.add("createTestApp", () => {
const appName = "Cypress Tests" const appName = "Cypress Tests"
cy.deleteApp(appName) cy.deleteApp(appName)
cy.createApp(appName, "This app is used for Cypress testing.") cy.createApp(appName, "This app is used for Cypress testing.")
cy.createScreen("home")
}) })
Cypress.Commands.add("createTestTableWithData", () => { Cypress.Commands.add("createTestTableWithData", () => {