|
|
@ -24,6 +24,19 @@ |
|
|
// -- This will overwrite an existing command --
|
|
|
// -- This will overwrite an existing command --
|
|
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("login", name => { |
|
|
|
|
|
cy.visit(`localhost:${Cypress.env("PORT")}/builder`) |
|
|
|
|
|
cy.contains("Create Test User").click() |
|
|
|
|
|
cy.get("input") |
|
|
|
|
|
.first() |
|
|
|
|
|
.type("test@test.com") |
|
|
|
|
|
|
|
|
|
|
|
cy.get('input[type="password"]').type("test") |
|
|
|
|
|
|
|
|
|
|
|
cy.contains("Login").click() |
|
|
|
|
|
cy.wait(1000) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
Cypress.Commands.add("createApp", name => { |
|
|
Cypress.Commands.add("createApp", name => { |
|
|
cy.visit(`localhost:${Cypress.env("PORT")}/builder`) |
|
|
cy.visit(`localhost:${Cypress.env("PORT")}/builder`) |
|
|
// wait for init API calls on visit
|
|
|
// wait for init API calls on visit
|
|
|
@ -44,12 +57,6 @@ Cypress.Commands.add("createApp", name => { |
|
|
.type(name) |
|
|
.type(name) |
|
|
.should("have.value", name) |
|
|
.should("have.value", name) |
|
|
cy.contains("Next").click() |
|
|
cy.contains("Next").click() |
|
|
cy.get("input[name=email]") |
|
|
|
|
|
.click() |
|
|
|
|
|
.type("test@test.com") |
|
|
|
|
|
cy.get("input[name=password]") |
|
|
|
|
|
.click() |
|
|
|
|
|
.type("test") |
|
|
|
|
|
cy.contains("Submit").click() |
|
|
cy.contains("Submit").click() |
|
|
cy.get("[data-cy=new-table]", { |
|
|
cy.get("[data-cy=new-table]", { |
|
|
timeout: 20000, |
|
|
timeout: 20000, |
|
|
|