Cypress: Smoke build test changes

User Management & Revert App test files changed to better suit the timing of the smoke build
This commit is contained in:
Mitch-Budibase 2022-07-26 14:43:06 +01:00
parent 2521b59de2
commit d4033c8fd4
4 changed files with 7 additions and 4 deletions

View File

@ -57,6 +57,7 @@ filterTests(["smoke", "all"], () => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000})
cy.get(interact.SPECTRUM_SIDENAV).contains("Users").click()
cy.get(interact.SPECTRUM_TABLE, { timeout: 1000 }).contains("bbuser").click()
cy.get(interact.SPECTRUM_HEADING).contains("bbuser", { timeout: 2000})
for (let i = 0; i < 3; i++) {
cy.get(interact.SPECTRUM_TABLE, { timeout: 3000})
.eq(1)

View File

@ -15,7 +15,7 @@ filterTests(['smoke', 'all'], () => {
})
cy.get(interact.SPECTRUM_MODAL).within(() => {
// Enter app name before revert
cy.get("input").type("Cypress Tests")
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).type("Cypress Tests")
cy.intercept('**/revert').as('revertApp')
// Click Revert
cy.get(interact.SPECTRUM_BUTTON).contains("Revert").click({ force: true })

View File

@ -289,7 +289,7 @@ Cypress.Commands.add("updateAppName", (changedName, noName) => {
})
Cypress.Commands.add("publishApp", resolvedAppPath => {
//Assumes you have navigated to an application first
// Assumes you have navigated to an application first
cy.get(".toprightnav button.spectrum-Button")
.contains("Publish")
.click({ force: true })
@ -301,7 +301,7 @@ Cypress.Commands.add("publishApp", resolvedAppPath => {
cy.wait(1000)
})
//Verify that the app url is presented correctly to the user
// Verify that the app url is presented correctly to the user
cy.get(".spectrum-Modal [data-cy='deploy-app-success-modal']")
.should("be.visible")
.within(() => {
@ -514,7 +514,8 @@ Cypress.Commands.add("searchAndAddComponent", component => {
cy.get(".spectrum-Button").contains("Component").click({ force: true })
// Search and add component
cy.get(".spectrum-Textfield-input").wait(500).clear().type(component)
cy.wait(500)
cy.get(".spectrum-Textfield-input").clear().type(component)
cy.get(".body").within(() => {
cy.get(".component")
.contains(new RegExp("^" + component + "$"), { timeout: 3000 })

View File

@ -108,6 +108,7 @@ export const CONTAINER = ".container"
export const REGENERATE = ".regenerate"
export const SPECTRUM_DIALOG_CONTENT = ".spectrum-Dialog-content"
export const SPECTRUM_ICON = ".spectrum-Icon"
export const SPECTRUM_HEADING = ".spectrum-Heading"
//createView
export const SPECTRUM_MENU_ITEM_LABEL = ".spectrum-Menu-itemLabel"