Oracle & Table pagination Test Env Only
createTable -Pagination is now Test Env only oracle -Test Env only -Removed smoke test tag commands -Fix for createApp command -Increase wait for createRestQuery command
This commit is contained in:
parent
863abdb4b3
commit
a49c2d2200
|
@ -50,6 +50,8 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.contains("RoverUpdated").should("not.exist")
|
cy.contains("RoverUpdated").should("not.exist")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (Cypress.env("TEST_ENV")) {
|
||||||
|
// No Pagination in CI - Test env only for the next two tests
|
||||||
it("Adds 15 rows and checks pagination", () => {
|
it("Adds 15 rows and checks pagination", () => {
|
||||||
// 10 rows per page, 15 rows should create 2 pages within table
|
// 10 rows per page, 15 rows should create 2 pages within table
|
||||||
const totalRows = 16
|
const totalRows = 16
|
||||||
|
@ -79,6 +81,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.get(".spectrum-ActionButton").eq(1).should('not.be.enabled')
|
cy.get(".spectrum-ActionButton").eq(1).should('not.be.enabled')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
it("deletes a column", () => {
|
it("deletes a column", () => {
|
||||||
const columnName = "nameupdated"
|
const columnName = "nameupdated"
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import filterTests from "../../support/filterTests"
|
import filterTests from "../../support/filterTests"
|
||||||
|
|
||||||
filterTests(['all', 'smoke'], () => {
|
filterTests(['all'], () => {
|
||||||
context("Oracle Datasource Testing", () => {
|
context("Oracle Datasource Testing", () => {
|
||||||
|
if (Cypress.env("TEST_ENV")) {
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.createTestApp()
|
cy.createTestApp()
|
||||||
|
@ -37,8 +39,6 @@ filterTests(['all', 'smoke'], () => {
|
||||||
// Intercept Request after button click & apply assertions
|
// Intercept Request after button click & apply assertions
|
||||||
cy.wait("@datasource")
|
cy.wait("@datasource")
|
||||||
cy.get("@datasource").its('response.body')
|
cy.get("@datasource").its('response.body')
|
||||||
.should('have.property', 'message', 'NJS-007: invalid value for "user" in parameter 1')
|
|
||||||
cy.get("@datasource").its('response.body')
|
|
||||||
.should('have.property', 'status', 500)
|
.should('have.property', 'status', 500)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -191,5 +191,6 @@ filterTests(['all', 'smoke'], () => {
|
||||||
// Confirm deletion
|
// Confirm deletion
|
||||||
cy.get(".nav-item").should('not.contain', queryName)
|
cy.get(".nav-item").should('not.contain', queryName)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -35,14 +35,7 @@ Cypress.Commands.add("login", () => {
|
||||||
Cypress.Commands.add("createApp", name => {
|
Cypress.Commands.add("createApp", name => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
|
||||||
.its("body")
|
|
||||||
.then(body => {
|
|
||||||
if (body.length > 0) {
|
|
||||||
cy.get(".spectrum-Button").contains("Create app").click({ force: true })
|
cy.get(".spectrum-Button").contains("Create app").click({ force: true })
|
||||||
}
|
|
||||||
})
|
|
||||||
cy.contains(/Start from scratch/).dblclick()
|
|
||||||
cy.get(".spectrum-Modal").within(() => {
|
cy.get(".spectrum-Modal").within(() => {
|
||||||
cy.get("input").eq(0).type(name).should("have.value", name).blur()
|
cy.get("input").eq(0).type(name).should("have.value", name).blur()
|
||||||
cy.get(".spectrum-ButtonGroup").contains("Create app").click()
|
cy.get(".spectrum-ButtonGroup").contains("Create app").click()
|
||||||
|
@ -445,7 +438,7 @@ Cypress.Commands.add("addDatasourceConfig", (datasource, skipFetch) => {
|
||||||
Cypress.Commands.add("createRestQuery", (method, restUrl) => {
|
Cypress.Commands.add("createRestQuery", (method, restUrl) => {
|
||||||
// addExternalDatasource should be called prior to this
|
// addExternalDatasource should be called prior to this
|
||||||
// Configures REST datasource & sends query
|
// Configures REST datasource & sends query
|
||||||
cy.wait(500)
|
cy.wait(1000)
|
||||||
cy.get(".spectrum-Button").contains("Add query").click({ force: true })
|
cy.get(".spectrum-Button").contains("Add query").click({ force: true })
|
||||||
// Select Method & add Rest URL
|
// Select Method & add Rest URL
|
||||||
cy.get(".spectrum-Picker-label").eq(1).click()
|
cy.get(".spectrum-Picker-label").eq(1).click()
|
||||||
|
|
Loading…
Reference in New Issue