1
0
Fork 0
mirror of synced 2024-09-17 17:57:47 +12:00

Adding tags to tests

Currently there is 'smoke' and 'all' tags
This commit is contained in:
Mitch-Budibase 2022-01-21 12:43:27 +00:00
parent 9034f23fde
commit 8b8cb21ec3
22 changed files with 1770 additions and 1669 deletions

View file

@ -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", () => {
})
})
})
})

View file

@ -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)
}
})
})

View file

@ -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", () => {
})
}
})
})

View file

@ -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", () => {
})
})
})
})

View file

@ -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")
})
})
})

View file

@ -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")
})
})
})

View file

@ -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()
})
}
})

View file

@ -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", () => {
})
})
})
})

View file

@ -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", () => {
})
})
})
})

View file

@ -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")
})
})
})

View file

@ -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")
})
})
})

View file

@ -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
}
})

View file

@ -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"]')
}
})
})

View file

@ -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)
})
})
})

View file

@ -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", () => {
})
}
})
})

View file

@ -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)
})
})
})

View file

@ -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", () => {
}
}
})
})

View file

@ -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)
})
})
})

View file

@ -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", () => {
})
})
})
})

View file

@ -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", () => {
})
}
})
})

View file

@ -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", () => {
})
})
})
})

View file

@ -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;