Merge pull request #6581 from Budibase/cypress-testing

Smoke Build Test Changes
This commit is contained in:
Mitch-Budibase 2022-07-06 16:31:22 +01:00 committed by GitHub
commit 388fcb41ab
6 changed files with 14 additions and 5 deletions

View File

@ -36,5 +36,9 @@ filterTests(['all'], () => {
}) })
cy.addCustomSourceOptions(totalRadioButtons) cy.addCustomSourceOptions(totalRadioButtons)
} }
after(() => {
cy.deleteAllApps()
})
}) })
}) })

View File

@ -9,10 +9,11 @@ filterTests(["smoke", "all"], () => {
before(() => { before(() => {
cy.login() cy.login()
cy.deleteApp("Cypress Tests") cy.deleteApp("Cypress Tests")
cy.createApp("Cypress Tests") cy.createApp("Cypress Tests", false)
// Create new user // Create new user
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 1000}) cy.wait(500)
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000})
cy.createUser(bbUserEmail) cy.createUser(bbUserEmail)
cy.contains("bbuser").click() cy.contains("bbuser").click()
cy.wait(500) cy.wait(500)

View File

@ -10,7 +10,7 @@ filterTests(["smoke", "all"], () => {
}) })
it("should create a user via basic onboarding", () => { it("should create a user via basic onboarding", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 1000}) cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000})
cy.createUser("bbuser@test.com") cy.createUser("bbuser@test.com")
cy.get(interact.SPECTRUM_TABLE).should("contain", "bbuser") cy.get(interact.SPECTRUM_TABLE).should("contain", "bbuser")
}) })

View File

@ -103,6 +103,8 @@ filterTests(["smoke", "all"], () => {
} }
cy.get("button").contains("Update password").click({ force: true }) cy.get("button").contains("Update password").click({ force: true })
}) })
// Remove users name
cy.updateUserInformation()
}) })
}) })
}) })

View File

@ -51,7 +51,8 @@ filterTests(['smoke', 'all'], () => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 })
// Start create app process. If apps already exist, click second button // Start create app process. If apps already exist, click second button
cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true }) cy.wait(1000)
cy.get(interact.CREATE_APP_BUTTON, { timeout: 3000 }).click({ force: true })
const appName = "Cypress Tests" const appName = "Cypress Tests"
cy.get(interact.SPECTRUM_MODAL).within(() => { cy.get(interact.SPECTRUM_MODAL).within(() => {
@ -86,7 +87,7 @@ filterTests(['smoke', 'all'], () => {
const appName = "Cypress Tests" const appName = "Cypress Tests"
cy.createApp(appName, false) cy.createApp(appName, false)
cy.visit(`${Cypress.config().baseUrl}/builder`) cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.applicationInAppTable(appName) cy.applicationInAppTable(appName)
cy.deleteApp(appName) cy.deleteApp(appName)

View File

@ -135,6 +135,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => {
typeof addDefaultTable != "boolean" ? true : addDefaultTable typeof addDefaultTable != "boolean" ? true : addDefaultTable
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.wait(1000)
cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true }) cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true })
// If apps already exist // If apps already exist