|
|
|
@ -14,11 +14,8 @@ filterTests(['smoke', 'all'], () => { |
|
|
|
cy.closeModal(); |
|
|
|
|
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get(interact.LABEL_ADD_CIRCLE).click() |
|
|
|
cy.get(interact.SPECTRUM_MODAL).within(() => { |
|
|
|
cy.get(interact.ITEM_DISABLED).contains("Autogenerated screens") |
|
|
|
cy.get(interact.CONFIRM_WRAP_SPE_BUTTON).should('be.disabled') |
|
|
|
}) |
|
|
|
cy.navigateToAutogeneratedModal() |
|
|
|
cy.get(interact.CONFIRM_WRAP_SPE_BUTTON).should('be.disabled') |
|
|
|
|
|
|
|
cy.deleteAllApps() |
|
|
|
}); |
|
|
|
@ -45,25 +42,25 @@ filterTests(['smoke', 'all'], () => { |
|
|
|
// Create Autogenerated screens from the internal table
|
|
|
|
cy.createDatasourceScreen(["Cypress Tests"]) |
|
|
|
// Confirm screens have been auto generated
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").click({ force: true }) |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'cypress-tests/:id') |
|
|
|
cy.get(interact.BODY).should('contain', "cypress-tests") |
|
|
|
.and('contain', 'cypress-tests/:id') |
|
|
|
.and('contain', 'cypress-tests/new/row') |
|
|
|
}) |
|
|
|
|
|
|
|
it("should generate multiple internal table screens at once", () => { |
|
|
|
// Create a second internal table
|
|
|
|
const initialTable = "Cypress Tests" |
|
|
|
const secondTable = "Table Two" |
|
|
|
// Create a second internal table
|
|
|
|
cy.createTable(secondTable) |
|
|
|
// Create Autogenerated screens from the internal tables
|
|
|
|
cy.createDatasourceScreen([initialTable, secondTable]) |
|
|
|
// Confirm screens have been auto generated
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").click({ force: true }) |
|
|
|
// Previously generated tables are suffixed with numbers - as expected
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'cypress-tests-2/:id') |
|
|
|
cy.get(interact.BODY).should('contain', 'cypress-tests-2') |
|
|
|
.and('contain', 'cypress-tests-2/:id') |
|
|
|
.and('contain', 'cypress-tests-2/new/row') |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-two").click() |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-two/:id') |
|
|
|
.and('contain', 'table-two') |
|
|
|
.and('contain', 'table-two/:id') |
|
|
|
.and('contain', 'table-two/new/row') |
|
|
|
}) |
|
|
|
|
|
|
|
@ -73,17 +70,17 @@ filterTests(['smoke', 'all'], () => { |
|
|
|
cy.createTable("Table Four") |
|
|
|
cy.createDatasourceScreen(["Table Three", "Table Four"], "Admin") |
|
|
|
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-three").click() |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-three/:id') |
|
|
|
.and('contain', 'table-three/new/row') |
|
|
|
// Filter screens to Admin
|
|
|
|
cy.filterScreensAccessLevel('Admin') |
|
|
|
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-four").click() |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-four/:id') |
|
|
|
cy.get(interact.BODY).should('contain', 'table-three') |
|
|
|
.and('contain', 'table-three/:id') |
|
|
|
.and('contain', 'table-three/new/row') |
|
|
|
.and('contain', 'table-four') |
|
|
|
.and('contain', 'table-four/:id') |
|
|
|
.and('contain', 'table-four/new/row') |
|
|
|
|
|
|
|
//The access level should now be set to admin. Previous screens should be filtered.
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-two").should('not.exist') |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").should('not.exist') |
|
|
|
.and('not.contain', 'table-two') |
|
|
|
.and('not.contain', 'cypress-tests') |
|
|
|
}) |
|
|
|
|
|
|
|
if (Cypress.env("TEST_ENV")) { |
|
|
|
@ -96,8 +93,8 @@ filterTests(['smoke', 'all'], () => { |
|
|
|
// Create Autogenerated screens from a MySQL table - MySQL contains books table
|
|
|
|
cy.createDatasourceScreen(["books"]) |
|
|
|
|
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).contains("books").click() |
|
|
|
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'books/:id') |
|
|
|
cy.get(interact.BODY).should('contain', 'books') |
|
|
|
.and('contain', 'books/:id') |
|
|
|
.and('contain', 'books/new/row') |
|
|
|
}) |
|
|
|
} |
|
|
|
|