Adding tags to tests
Currently there is 'smoke' and 'all' tags
This commit is contained in:
parent
9034f23fde
commit
8b8cb21ec3
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Add Multi-Option Datatype", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -39,4 +42,4 @@ context("Add Multi-Option Datatype", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Add Radio Buttons", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -33,3 +36,4 @@ it("should add Radio Buttons options picker on form, add data, and confirm", ()
|
|||
cy.addCustomSourceOptions(totalRadioButtons)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Auto Screens UI", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -45,3 +48,4 @@ context("Auto Screens UI", () => {
|
|||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Change Application Icon and Colour", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -37,3 +40,4 @@ context("Change Application Icon and Colour", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from '../support/filterTests'
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create an Application", () => {
|
||||
it("should create a new application", () => {
|
||||
cy.login()
|
||||
|
@ -6,3 +9,4 @@ context("Create an Application", () => {
|
|||
cy.contains("Cypress Tests").should("exist")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create a automation", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -63,3 +66,4 @@ context("Create a automation", () => {
|
|||
cy.contains("automationGoodboy")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create Bindings", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -56,3 +59,4 @@ const addSettingBinding = (setting, bindingText, clickOption = true) => {
|
|||
cy.contains("Save").click()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
// TODO for now components are skipped, might not be good to keep doing this
|
||||
|
||||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
xcontext("Create Components", () => {
|
||||
let headlineId
|
||||
|
||||
|
@ -90,3 +94,4 @@ xcontext("Create Components", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Screen Tests", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -19,3 +22,4 @@ context("Screen Tests", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create a Table", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -101,3 +104,4 @@ context("Create a Table", () => {
|
|||
cy.contains("dog").should("not.exist")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create a User and Assign Roles", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -126,3 +130,4 @@ context("Create a User and Assign Roles", () => {
|
|||
cy.get(".spectrum-Table-body").should("not.have.text", "bbuser")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Create a View", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -150,3 +153,4 @@ function removeSpacing(headers) {
|
|||
}
|
||||
return newHeaders
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
xcontext("Custom Theming Properties", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -81,3 +84,4 @@ xcontext("Custom Theming Properties", () => {
|
|||
.get('[title="Gray 800"]').children().find('[aria-label="Checkmark"]')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Datasource Wizard", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -35,3 +38,4 @@ context("Datasource Wizard", () => {
|
|||
.should('have.property', 'status', 500)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("MySQL Datasource Testing", () => {
|
||||
if (Cypress.env("TEST_ENV")) {
|
||||
|
||||
|
@ -185,3 +188,4 @@ context("MySQL Datasource Testing", () => {
|
|||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../../support/filterTests"
|
||||
|
||||
filterTests(['all', 'smoke'], () => {
|
||||
context("Oracle Datasource Testing", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -189,3 +192,4 @@ context("Oracle Datasource Testing", () => {
|
|||
cy.get(".nav-item").should('not.contain', queryName)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("PostgreSQL Datasource Testing", () => {
|
||||
if (Cypress.env("TEST_ENV")) {
|
||||
|
||||
|
@ -235,3 +238,4 @@ context("PostgreSQL Datasource Testing", () => {
|
|||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("REST Datasource Testing", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -37,3 +40,4 @@ context("REST Datasource Testing", () => {
|
|||
.should('contain', 200)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Query Level Transformers", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -110,3 +113,4 @@ context("Query Level Transformers", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Rename an App", () => {
|
||||
beforeEach(() => {
|
||||
cy.login()
|
||||
|
@ -125,3 +128,4 @@ it("should validate application names", () => {
|
|||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
|
||||
filterTests(['smoke', 'all'], () => {
|
||||
context("Revert apps", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
|
@ -60,3 +63,4 @@ context("Revert apps", () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
const filterTests = (testTags, runTest) => {
|
||||
// testTags is an array of tags
|
||||
// runTest is all tests
|
||||
if (Cypress.env('TEST_TAGS')) {
|
||||
const tags = Cypress.env('TEST_TAGS').split('/');
|
||||
const found = testTags.some(($testTags) => tags.includes($testTags));
|
||||
|
||||
if (found) {
|
||||
runTest();
|
||||
}
|
||||
} else {
|
||||
runTest();
|
||||
}
|
||||
};
|
||||
|
||||
export default filterTests;
|
Loading…
Reference in New Issue