Merge pull request #6899 from Budibase/cypress-testing

Cypress: Smoke build test changes
This commit is contained in:
Mitch-Budibase 2022-07-26 15:01:08 +01:00 committed by GitHub
commit 412b03ccc8
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

@ -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"