This commit is contained in:
Martin McKeaveney 2021-06-02 19:21:55 +01:00
parent 5b26d094cc
commit 6f663a1daf
1 changed files with 10 additions and 10 deletions

View File

@ -18,20 +18,20 @@ context("Create a View", () => {
it("creates a view", () => { it("creates a view", () => {
cy.contains("Create view").click() cy.contains("Create view").click()
cy.get(".spectrum-Dialog-grid").within(() => { cy.get(".modal-inner-wrapper").within(() => {
cy.get("input").type("Test view") cy.get("input").type("Test View")
cy.get(".spectrum-Button--cta").click() cy.get("button").contains("Create View").click({ force: true })
}) })
cy.get(".table-title h1").contains("Test view") cy.get(".table-title h1").contains("Test View")
cy.get("[data-cy=table-header]").then($headers => { cy.get(".title").then($headers => {
expect($headers).to.have.length(3) expect($headers).to.have.length(3)
const headers = Array.from($headers).map(header => const headers = Array.from($headers).map(header =>
header.textContent.trim() header.textContent.trim()
) )
expect(removeSpacing(headers)).to.deep.eq([ expect(removeSpacing(headers)).to.deep.eq([
"rating Number", "group",
"age Number", "age",
"group Text", "rating",
]) ])
}) })
}) })
@ -56,7 +56,7 @@ context("Create a View", () => {
// .find("select") // .find("select")
// .eq(1) // .eq(1)
// .select("More Than") // .select("More Than")
cy.get(".menu-container") cy.get(".modal-inner-wrapper")
.find("input") .find("input")
.type(18) .type(18)
cy.contains("Save").click() cy.contains("Save").click()
@ -135,7 +135,7 @@ context("Create a View", () => {
.find(".ri-more-line") .find(".ri-more-line")
.click({ force: true }) .click({ force: true })
cy.get("[data-cy=edit-view]").click() cy.get("[data-cy=edit-view]").click()
cy.get(".menu-container").within(() => { cy.get(".modal-inner-wrapper").within(() => {
cy.get("input").type(" Updated") cy.get("input").type(" Updated")
cy.contains("Save").click() cy.contains("Save").click()
}) })