Changes to renameAnApplication & createUserAndRoles

renameAnApplication - changing the navigation to a direct URL rather than clicking the home logo button
createUserAndRoles - Removing the After action (now supports correct flow of tests)
This commit is contained in:
Mitch-Budibase 2022-04-01 13:15:06 +01:00
parent f3b9a06318
commit 4ad60322ab
3 changed files with 7 additions and 9 deletions

View File

@ -6,12 +6,6 @@ filterTests(["smoke", "all"], () => {
cy.login() cy.login()
}) })
if (!(Cypress.env("TEST_ENV"))) {
after(() => {
cy.deleteAllApps()
})
}
it("should create a user", () => { it("should create a user", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`) cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(1000) cy.wait(1000)

View File

@ -11,7 +11,8 @@ filterTests(['all'], () => {
const appName = "Cypress Tests" const appName = "Cypress Tests"
const appRename = "Cypress Renamed" const appRename = "Cypress Renamed"
// Rename app, Search for app, Confirm name was changed // Rename app, Search for app, Confirm name was changed
cy.get(".home-logo").click() cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)
renameApp(appName, appRename) renameApp(appName, appRename)
cy.reload() cy.reload()
cy.wait(1000) cy.wait(1000)
@ -37,7 +38,8 @@ filterTests(['all'], () => {
cy.get(".spectrum-Button").contains("Publish").click({ force: true }) cy.get(".spectrum-Button").contains("Publish").click({ force: true })
}) })
// Rename app, Search for app, Confirm name was changed // Rename app, Search for app, Confirm name was changed
cy.get(".home-logo").click() cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)
renameApp(appName, appRename, true) renameApp(appName, appRename, true)
cy.get(".appTable").find(".wrapper").should("have.length", 1) cy.get(".appTable").find(".wrapper").should("have.length", 1)
cy.applicationInAppTable(appRename) cy.applicationInAppTable(appRename)
@ -45,7 +47,8 @@ filterTests(['all'], () => {
it("Should try to rename an application to have no name", () => { it("Should try to rename an application to have no name", () => {
const appName = "Cypress Tests" const appName = "Cypress Tests"
cy.get(".home-logo").click() cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)
renameApp(appName, " ", false, true) renameApp(appName, " ", false, true)
cy.wait(500) cy.wait(500)
// Close modal and confirm name has not been changed // Close modal and confirm name has not been changed

View File

@ -342,6 +342,7 @@ Cypress.Commands.add("addCustomSourceOptions", totalOptions => {
//Filters visible with 1 or more //Filters visible with 1 or more
Cypress.Commands.add("searchForApplication", appName => { Cypress.Commands.add("searchForApplication", appName => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(2000) cy.wait(2000)
// Searches for the app // Searches for the app
cy.get(".filter").then(() => { cy.get(".filter").then(() => {