Cypress - New Portal Test Updates
Commands - Updating commands - UpdateUserInformation, deleteApp, searchForApplication, applicationInAppTable CreateApp - Skipping Templates tests - Updates for tests which utilise user info AppOverview - Skipping these tests UserSettings - Skipping one test -> allow for copy of API key (will be covered elsewhere - Updates applied to the remaining tests Authentication - Skipping these tests
This commit is contained in:
parent
bec2edcc73
commit
9280eedad1
5 changed files with 145 additions and 123 deletions
|
@ -2,7 +2,7 @@ import filterTests from "../../support/filterTests"
|
||||||
// const interact = require("../support/interact")
|
// const interact = require("../support/interact")
|
||||||
|
|
||||||
filterTests(["smoke", "all"], () => {
|
filterTests(["smoke", "all"], () => {
|
||||||
context("Auth Configuration", () => {
|
xcontext("Auth Configuration", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
})
|
})
|
||||||
|
@ -21,7 +21,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.get("[data-cy=oidc-active]").should('not.be.checked')
|
cy.get("[data-cy=oidc-active]").should('not.be.checked')
|
||||||
|
|
||||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||||
cy.wait("@updateAuth")
|
cy.wait("@updateAuth")
|
||||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||||
|
|
||||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||||
cy.wait("@updateAuth")
|
cy.wait("@updateAuth")
|
||||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||||
|
|
||||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||||
cy.wait("@updateAuth")
|
cy.wait("@updateAuth")
|
||||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||||
|
|
||||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||||
cy.wait("@updateAuth")
|
cy.wait("@updateAuth")
|
||||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
|
|
||||||
cy.get("div.content").scrollTo("bottom")
|
cy.get("div.content").scrollTo("bottom")
|
||||||
|
|
||||||
cy.get("[data-cy=restore-oidc-default-scopes]").click({force: true})
|
cy.get("[data-cy=restore-oidc-default-scopes]").click({ force: true })
|
||||||
|
|
||||||
cy.get(".spectrum-Tags").find(".spectrum-Tags-item").its("length").should("eq", 4)
|
cy.get(".spectrum-Tags").find(".spectrum-Tags-item").its("length").should("eq", 4)
|
||||||
|
|
||||||
|
|
|
@ -9,101 +9,106 @@ filterTests(["smoke", "all"], () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should update user information via user settings menu", () => {
|
it("should update user information via user settings menu", () => {
|
||||||
const fname = "test"
|
const fname = "test"
|
||||||
const lname = "user"
|
const lname = "user"
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.updateUserInformation(fname, lname)
|
cy.updateUserInformation(fname, lname)
|
||||||
|
|
||||||
// Go to user info and confirm name update
|
// Go to user info and confirm name update
|
||||||
cy.contains("Users").click()
|
cy.contains("Users").click()
|
||||||
cy.contains("test@test.com").click()
|
cy.contains("test@test.com").click()
|
||||||
|
|
||||||
cy.get(interact.FIELD, { timeout: 1000 }).eq(1).within(() => {
|
cy.get(interact.FIELD, { timeout: 1000 }).eq(1).within(() => {
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', fname)
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', fname)
|
||||||
})
|
})
|
||||||
cy.get(interact.FIELD).eq(2).within(() => {
|
cy.get(interact.FIELD).eq(2).within(() => {
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', lname)
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', lname)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should allow copying of the users API key", () => {
|
xit("should allow copying of the users API key", () => {
|
||||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||||
cy.get(interact.SPECTRUM_ICON).click({force: true})
|
cy.get(interact.SPECTRUM_ICON).click({ force: true })
|
||||||
})
|
})
|
||||||
// There may be timing issues with this on the smoke build
|
// There may be timing issues with this on the smoke build
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
cy.get(".spectrum-Toast-content")
|
cy.get(".spectrum-Toast-content")
|
||||||
.contains("URL copied to clipboard")
|
.contains("URL copied to clipboard")
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should allow API key regeneration", () => {
|
it("should allow API key regeneration", () => {
|
||||||
// Get initial API key value
|
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT)
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
||||||
|
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||||
|
cy.get(interact.SPECTRUM_ICON).click({ force: true })
|
||||||
|
})
|
||||||
|
// Get initial API key value
|
||||||
|
cy.get(interact.SPECTRUM_DIALOG_CONTENT)
|
||||||
.find(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').as('keyOne')
|
.find(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').as('keyOne')
|
||||||
|
|
||||||
// Click re-generate key button
|
// Click re-generate key button
|
||||||
cy.get("button").contains("Re-generate key").click({ force: true })
|
cy.get("button").contains("Regenerate key").click({ force: true })
|
||||||
|
|
||||||
// Verify API key was changed
|
// Verify API key was changed
|
||||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||||
cy.get('@keyOne').then((keyOne) => {
|
cy.get('@keyOne').then((keyOne) => {
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').should('not.eq', keyOne)
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').should('not.eq', keyOne)
|
||||||
})
|
|
||||||
})
|
})
|
||||||
cy.closeModal()
|
})
|
||||||
|
cy.closeModal()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should update password", () => {
|
it("should update password", () => {
|
||||||
// Access Update password modal
|
// Access Update password modal
|
||||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||||
|
|
||||||
// Enter new password and update
|
// Enter new password and update
|
||||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||||
for (let i = 0; i < 2; i++) {
|
for (let i = 0; i < 2; i++) {
|
||||||
// password set to 'newpwd'
|
// password set to 'newpwd'
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("newpwd")
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("newpwd")
|
||||||
}
|
}
|
||||||
cy.get("button").contains("Update password").click({ force: true })
|
cy.get("button").contains("Update password").click({ force: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
// Logout & in with new password
|
// Logout & in with new password
|
||||||
//cy.logOut()
|
//cy.logOut()
|
||||||
cy.login("test@test.com", "newpwd")
|
cy.login("test@test.com", "newpwd")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should open and close developer mode", () => {
|
it("should open and close developer mode", () => {
|
||||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||||
|
|
||||||
// Close developer mode & verify
|
// Close developer mode & verify
|
||||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Close developer mode").click({ force: true })
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Close developer mode").click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_SIDENAV).should('not.exist') // No config sections
|
cy.get(interact.SPECTRUM_SIDENAV).should('not.exist') // No config sections
|
||||||
cy.get(interact.CREATE_APP_BUTTON).should('not.exist') // No create app button
|
cy.get(interact.CREATE_APP_BUTTON).should('not.exist') // No create app button
|
||||||
cy.get(".app").should('not.exist') // At least one app should be available
|
cy.get(".app").should('not.exist') // At least one app should be available
|
||||||
|
|
||||||
// Open developer mode & verify
|
// Open developer mode & verify
|
||||||
cy.get(".avatar > .icon").click({ force: true })
|
cy.get(".avatar > .icon").click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Open developer mode").click({ force: true })
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Open developer mode").click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_SIDENAV).should('exist') // config sections available
|
cy.get(".app-table").should('exist') // config sections available
|
||||||
cy.get(interact.CREATE_APP_BUTTON).should('exist') // create app button available
|
cy.get(interact.CREATE_APP_BUTTON).should('exist') // create app button available
|
||||||
})
|
})
|
||||||
|
|
||||||
after(() => {
|
after(() => {
|
||||||
// Change password back to original value
|
// Change password back to original value
|
||||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||||
for (let i = 0; i < 2; i++) {
|
for (let i = 0; i < 2; i++) {
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("test")
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("test")
|
||||||
}
|
}
|
||||||
cy.get("button").contains("Update password").click({ force: true })
|
cy.get("button").contains("Update password").click({ force: true })
|
||||||
})
|
|
||||||
// Remove users name
|
|
||||||
cy.updateUserInformation()
|
|
||||||
})
|
})
|
||||||
|
// Remove users name
|
||||||
|
cy.updateUserInformation()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,7 +2,7 @@ import filterTests from "../support/filterTests"
|
||||||
import clientPackage from "@budibase/client/package.json"
|
import clientPackage from "@budibase/client/package.json"
|
||||||
|
|
||||||
filterTests(["all"], () => {
|
filterTests(["all"], () => {
|
||||||
context("Application Overview screen", () => {
|
xcontext("Application Overview screen", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.deleteAllApps()
|
cy.deleteAllApps()
|
||||||
|
|
|
@ -22,7 +22,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
it("should provide filterable templates", () => {
|
xit("should provide filterable templates", () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
.its("body")
|
.its("body")
|
||||||
.then(val => {
|
.then(val => {
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
cy.get(interact.SPECTRUM_BUTTON).contains("Templates").click({force: true})
|
cy.get(interact.SPECTRUM_BUTTON).contains("View Templates").click({ force: true })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -123,35 +123,49 @@ filterTests(['smoke', 'all'], () => {
|
||||||
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
||||||
|
|
||||||
cy.importApp(exportedApp, "")
|
cy.importApp(exportedApp, "")
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
|
||||||
|
|
||||||
cy.applicationInAppTable("My app")
|
cy.applicationInAppTable("My app")
|
||||||
|
cy.get(".app-table .name").eq(0).click()
|
||||||
cy.get(".appTable .name").eq(0).click()
|
cy.closeModal()
|
||||||
|
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||||
cy.deleteApp("My app")
|
cy.get(".spectrum-Menu").within(() => {
|
||||||
|
cy.contains("Overview").click()
|
||||||
|
})
|
||||||
|
cy.get(".app-overview-actions-icon").within(() => {
|
||||||
|
cy.get(".spectrum-Icon").click({ force: true })
|
||||||
|
})
|
||||||
|
cy.get(".spectrum-Menu").contains("Delete").click({ force: true })
|
||||||
|
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||||
|
cy.get("input").type("My app")
|
||||||
|
})
|
||||||
|
cy.get(".spectrum-Button--warning").click()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should create an application from an export, using the users first name as the default app name", () => {
|
it("should create an application from an export, using the users first name as the default app name", () => {
|
||||||
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
||||||
|
|
||||||
cy.updateUserInformation("Ted", "Userman")
|
cy.updateUserInformation("Ted", "Userman")
|
||||||
|
|
||||||
cy.importApp(exportedApp, "")
|
cy.importApp(exportedApp, "")
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
|
||||||
cy.applicationInAppTable("Teds app")
|
cy.applicationInAppTable("Teds app")
|
||||||
|
cy.get(".app-table .name").eq(0).click()
|
||||||
cy.get(".appTable .name").eq(0).click()
|
cy.closeModal()
|
||||||
|
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||||
cy.deleteApp("Teds app")
|
cy.get(".spectrum-Menu").within(() => {
|
||||||
|
cy.contains("Overview").click()
|
||||||
|
})
|
||||||
|
cy.get(".app-overview-actions-icon").within(() => {
|
||||||
|
cy.get(".spectrum-Icon").click({ force: true })
|
||||||
|
})
|
||||||
|
cy.get(".spectrum-Menu").contains("Delete").click({ force: true })
|
||||||
|
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||||
|
cy.get("input").type("Teds app")
|
||||||
|
})
|
||||||
|
cy.get(".spectrum-Button--warning").click()
|
||||||
cy.updateUserInformation("", "")
|
cy.updateUserInformation("", "")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should generate the first application from a template", () => {
|
xit("should generate the first application from a template", () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
|
@ -172,7 +186,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
const card = cy.get('.template-card').eq(0).should("exist");
|
const card = cy.get('.template-card').eq(0).should("exist");
|
||||||
const cardOverlay = card.get('.template-thumbnail-action-overlay').should("exist")
|
const cardOverlay = card.get('.template-thumbnail-action-overlay').should("exist")
|
||||||
cardOverlay.invoke("show")
|
cardOverlay.invoke("show")
|
||||||
cardOverlay.get("button").contains("Use template").should("exist").click({force: true})
|
cardOverlay.get("button").contains("Use template").should("exist").click({ force: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
// CMD Create app from theme card
|
// CMD Create app from theme card
|
||||||
|
@ -180,20 +194,20 @@ filterTests(['smoke', 'all'], () => {
|
||||||
|
|
||||||
const templateName = cy.get(".spectrum-Modal .template-thumbnail-text")
|
const templateName = cy.get(".spectrum-Modal .template-thumbnail-text")
|
||||||
templateName.invoke('text')
|
templateName.invoke('text')
|
||||||
.then(templateNameText => {
|
.then(templateNameText => {
|
||||||
const templateNameParsed = "/"+templateNameText.toLowerCase().replace(/\s+/g, "-")
|
const templateNameParsed = "/" + templateNameText.toLowerCase().replace(/\s+/g, "-")
|
||||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(0).should("have.value", templateNameText)
|
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(0).should("have.value", templateNameText)
|
||||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(1).should("have.value", templateNameParsed)
|
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(1).should("have.value", templateNameParsed)
|
||||||
|
|
||||||
cy.get(".spectrum-Modal .spectrum-ButtonGroup").contains("Create app").click()
|
cy.get(".spectrum-Modal .spectrum-ButtonGroup").contains("Create app").click()
|
||||||
cy.wait(5000)
|
cy.wait(5000)
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(2000)
|
cy.wait(2000)
|
||||||
|
|
||||||
cy.applicationInAppTable(templateNameText)
|
cy.applicationInAppTable(templateNameText)
|
||||||
cy.deleteApp(templateNameText)
|
cy.deleteApp(templateNameText)
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ Cypress.Commands.add("deleteUser", email => {
|
||||||
})
|
})
|
||||||
|
|
||||||
Cypress.Commands.add("updateUserInformation", (firstName, lastName) => {
|
Cypress.Commands.add("updateUserInformation", (firstName, lastName) => {
|
||||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({
|
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({
|
||||||
force: true,
|
force: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ Cypress.Commands.add("updateUserInformation", (firstName, lastName) => {
|
||||||
.blur()
|
.blur()
|
||||||
}
|
}
|
||||||
cy.get(".confirm-wrap").within(() => {
|
cy.get(".confirm-wrap").within(() => {
|
||||||
cy.get("button").contains("Update information").click({ force: true })
|
cy.get("button").contains("Save").click({ force: true })
|
||||||
})
|
})
|
||||||
cy.get(".spectrum-Dialog-grid").should("not.exist")
|
cy.get(".spectrum-Dialog-grid").should("not.exist")
|
||||||
})
|
})
|
||||||
|
@ -222,9 +222,12 @@ Cypress.Commands.add("deleteApp", name => {
|
||||||
// Go to app overview
|
// Go to app overview
|
||||||
const appIdParsed = appId.split("_").pop()
|
const appIdParsed = appId.split("_").pop()
|
||||||
const actionEleId = `[data-cy=row_actions_${appIdParsed}]`
|
const actionEleId = `[data-cy=row_actions_${appIdParsed}]`
|
||||||
cy.get(actionEleId).within(() => {
|
cy.get(actionEleId).click()
|
||||||
cy.contains("Manage").click({ force: true })
|
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||||
|
cy.get(".spectrum-Menu").within(() => {
|
||||||
|
cy.contains("Overview").click()
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
// Unpublish first if needed
|
// Unpublish first if needed
|
||||||
|
@ -400,7 +403,7 @@ Cypress.Commands.add("searchForApplication", appName => {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
// Searches for the app
|
// Searches for the app
|
||||||
cy.get(".filter").then(() => {
|
cy.get(".spectrum-Search").then(() => {
|
||||||
cy.get(".spectrum-Textfield").within(() => {
|
cy.get(".spectrum-Textfield").within(() => {
|
||||||
cy.get("input").eq(0).clear({ force: true })
|
cy.get("input").eq(0).clear({ force: true })
|
||||||
cy.get("input").eq(0).type(appName, { force: true })
|
cy.get("input").eq(0).type(appName, { force: true })
|
||||||
|
@ -413,7 +416,7 @@ Cypress.Commands.add("searchForApplication", appName => {
|
||||||
// Assumes there are no others
|
// Assumes there are no others
|
||||||
Cypress.Commands.add("applicationInAppTable", appName => {
|
Cypress.Commands.add("applicationInAppTable", appName => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 })
|
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 })
|
||||||
cy.get(".appTable", { timeout: 30000 }).within(() => {
|
cy.get(".app-table", { timeout: 30000 }).within(() => {
|
||||||
cy.get(".title").contains(appName).should("exist")
|
cy.get(".title").contains(appName).should("exist")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue