diff --git a/e2e/cypress.json b/e2e/cypress.json index 286c6dd..48496c1 100644 --- a/e2e/cypress.json +++ b/e2e/cypress.json @@ -1,8 +1,9 @@ { "integrationFolder": "tests", + "supportFile":"support", "xbaseUrl": "http://localhost:7575", "baseUrl":"http://localhost:8080", - "defaultCommandTimeout": 10000, + "xdefaultCommandTimeout": 10000, "env": { "adminusername": "superuser", "adminpassword": "l3tm3in" diff --git a/e2e/notes.txt b/e2e/notes.txt new file mode 100644 index 0000000..f606228 --- /dev/null +++ b/e2e/notes.txt @@ -0,0 +1,7 @@ +Smoke test = quick test to ensure the most critical functionality is not broken + this is not so useful for us as the act of development involves many smoke tests on it's own + also we don't release often enough to need this kind of test + +Regression test = extremely detailed test to ensure *all* functionality is working properly + this is the most useful test for us and the one to run before any releases + Assuming it takes an hour or two at the most to run that's perfectly fine before a release as a sanity check \ No newline at end of file diff --git a/e2e/support/commands.js b/e2e/support/commands.js new file mode 100644 index 0000000..119ab03 --- /dev/null +++ b/e2e/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/e2e/support/index.js b/e2e/support/index.js new file mode 100644 index 0000000..d68db96 --- /dev/null +++ b/e2e/support/index.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/e2e/tests/smoke.js b/e2e/tests/smoke.js index 6ae8a3f..6fb3504 100644 --- a/e2e/tests/smoke.js +++ b/e2e/tests/smoke.js @@ -1,5 +1,5 @@ // Basic smoke test, visit every form to ensure they load - +/// describe("SMOKE", () => { it("Every form opens without error", () => { cy.visit("/login");