Merge pull request #6899 from Budibase/cypress-testing
Cypress: Smoke build test changes
This commit is contained in:
commit
412b03ccc8
|
@ -57,6 +57,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000})
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000})
|
||||||
cy.get(interact.SPECTRUM_SIDENAV).contains("Users").click()
|
cy.get(interact.SPECTRUM_SIDENAV).contains("Users").click()
|
||||||
cy.get(interact.SPECTRUM_TABLE, { timeout: 1000 }).contains("bbuser").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++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
cy.get(interact.SPECTRUM_TABLE, { timeout: 3000})
|
cy.get(interact.SPECTRUM_TABLE, { timeout: 3000})
|
||||||
.eq(1)
|
.eq(1)
|
||||||
|
|
|
@ -15,7 +15,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
})
|
})
|
||||||
cy.get(interact.SPECTRUM_MODAL).within(() => {
|
cy.get(interact.SPECTRUM_MODAL).within(() => {
|
||||||
// Enter app name before revert
|
// 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')
|
cy.intercept('**/revert').as('revertApp')
|
||||||
// Click Revert
|
// Click Revert
|
||||||
cy.get(interact.SPECTRUM_BUTTON).contains("Revert").click({ force: true })
|
cy.get(interact.SPECTRUM_BUTTON).contains("Revert").click({ force: true })
|
||||||
|
|
|
@ -289,7 +289,7 @@ Cypress.Commands.add("updateAppName", (changedName, noName) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
Cypress.Commands.add("publishApp", resolvedAppPath => {
|
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")
|
cy.get(".toprightnav button.spectrum-Button")
|
||||||
.contains("Publish")
|
.contains("Publish")
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
|
@ -301,7 +301,7 @@ Cypress.Commands.add("publishApp", resolvedAppPath => {
|
||||||
cy.wait(1000)
|
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']")
|
cy.get(".spectrum-Modal [data-cy='deploy-app-success-modal']")
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
.within(() => {
|
.within(() => {
|
||||||
|
@ -514,7 +514,8 @@ Cypress.Commands.add("searchAndAddComponent", component => {
|
||||||
cy.get(".spectrum-Button").contains("Component").click({ force: true })
|
cy.get(".spectrum-Button").contains("Component").click({ force: true })
|
||||||
|
|
||||||
// Search and add component
|
// 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(".body").within(() => {
|
||||||
cy.get(".component")
|
cy.get(".component")
|
||||||
.contains(new RegExp("^" + component + "$"), { timeout: 3000 })
|
.contains(new RegExp("^" + component + "$"), { timeout: 3000 })
|
||||||
|
|
|
@ -108,6 +108,7 @@ export const CONTAINER = ".container"
|
||||||
export const REGENERATE = ".regenerate"
|
export const REGENERATE = ".regenerate"
|
||||||
export const SPECTRUM_DIALOG_CONTENT = ".spectrum-Dialog-content"
|
export const SPECTRUM_DIALOG_CONTENT = ".spectrum-Dialog-content"
|
||||||
export const SPECTRUM_ICON = ".spectrum-Icon"
|
export const SPECTRUM_ICON = ".spectrum-Icon"
|
||||||
|
export const SPECTRUM_HEADING = ".spectrum-Heading"
|
||||||
|
|
||||||
//createView
|
//createView
|
||||||
export const SPECTRUM_MENU_ITEM_LABEL = ".spectrum-Menu-itemLabel"
|
export const SPECTRUM_MENU_ITEM_LABEL = ".spectrum-Menu-itemLabel"
|
||||||
|
|
Loading…
Reference in New Issue