1
0
Fork 0
mirror of synced 2024-06-18 18:35:37 +12:00

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 5525859ba7
commit 9ffd278d80
3 changed files with 7 additions and 9 deletions

View file

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

View file

@ -11,7 +11,8 @@ filterTests(['all'], () => {
const appName = "Cypress Tests"
const appRename = "Cypress Renamed"
// 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)
cy.reload()
cy.wait(1000)
@ -37,7 +38,8 @@ filterTests(['all'], () => {
cy.get(".spectrum-Button").contains("Publish").click({ force: true })
})
// 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)
cy.get(".appTable").find(".wrapper").should("have.length", 1)
cy.applicationInAppTable(appRename)
@ -45,7 +47,8 @@ filterTests(['all'], () => {
it("Should try to rename an application to have no name", () => {
const appName = "Cypress Tests"
cy.get(".home-logo").click()
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)
renameApp(appName, " ", false, true)
cy.wait(500)
// 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
Cypress.Commands.add("searchForApplication", appName => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(2000)
// Searches for the app
cy.get(".filter").then(() => {