diff --git a/appli_sf/tests/E2E/cypress/integration/EmptyDB/1-login.spec.js b/appli_sf/tests/E2E/cypress/integration/EmptyDB/1-login.spec.js index 24f7808b0e183a6ea55aa348eb7f85340adbb437..1b0647ac11f43aa8d2d01b9f5afddb16ffa67a25 100644 --- a/appli_sf/tests/E2E/cypress/integration/EmptyDB/1-login.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/EmptyDB/1-login.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Connexion avec CSRF', () => { const inAdministration = () => { cy.location('href').should('match', /admin\/?$/) diff --git a/appli_sf/tests/E2E/cypress/integration/EmptyDB/2-params.spec.js b/appli_sf/tests/E2E/cypress/integration/EmptyDB/2-params.spec.js index 5f1d150992f73d95e285d89fd1fb7de39142d882..d64a6ad2ee44d4efca648e71fc1eaec926d00017 100644 --- a/appli_sf/tests/E2E/cypress/integration/EmptyDB/2-params.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/EmptyDB/2-params.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Paramètres de l\'application', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Paramètres de l\'application', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') }) it('Login', function () { diff --git a/appli_sf/tests/E2E/cypress/integration/EmptyDB/3-search-empty-db.spec.js b/appli_sf/tests/E2E/cypress/integration/EmptyDB/3-search-empty-db.spec.js index e6723e51a19b300908e7b7c8b8c1212941b24a3a..4cb80ef7db918458981499913752f814b25c21d5 100644 --- a/appli_sf/tests/E2E/cypress/integration/EmptyDB/3-search-empty-db.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/EmptyDB/3-search-empty-db.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Recherche avec table individu vide', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Recherche avec table individu vide', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') }) it('Login', function () { diff --git a/appli_sf/tests/E2E/cypress/integration/FullDB/4-search.spec.js b/appli_sf/tests/E2E/cypress/integration/FullDB/4-search.spec.js index 9466322f32544c93fc2553d7f45dd824784b02f1..c549d78c9e3571bde6b9be12a7e3367655b35370 100644 --- a/appli_sf/tests/E2E/cypress/integration/FullDB/4-search.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/FullDB/4-search.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Recherche', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Recherche', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') cy.deleteAllMails() }) diff --git a/appli_sf/tests/E2E/cypress/integration/FullDB/5-create-users.spec.js b/appli_sf/tests/E2E/cypress/integration/FullDB/5-create-users.spec.js index 8c0514c47265f4b9a914df166de7595a09ee89f6..b2c8dcd73ec1a373167e84bca5adcffc14f84f8e 100644 --- a/appli_sf/tests/E2E/cypress/integration/FullDB/5-create-users.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/FullDB/5-create-users.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Création d\'utilisateurs', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Création d\'utilisateurs', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') }) it('Login', function () { diff --git a/appli_sf/tests/E2E/cypress/integration/FullDB/6-create-instructors.spec.js b/appli_sf/tests/E2E/cypress/integration/FullDB/6-create-instructors.spec.js index 11a4a78632f1aafd73998692c9e400bb82b5bef7..6da620fdd4f4e3cd4542743708673eb33f585390 100644 --- a/appli_sf/tests/E2E/cypress/integration/FullDB/6-create-instructors.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/FullDB/6-create-instructors.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Création d\'instructeurs', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Création d\'instructeurs', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') cy.deleteAllMails() }) diff --git a/appli_sf/tests/E2E/cypress/integration/FullDB/7-stats.spec.js b/appli_sf/tests/E2E/cypress/integration/FullDB/7-stats.spec.js index c0c16061feafc788a4813ea4ff9964d2bad68d49..32510de4e4988b660628b894e4c0e9836e37b1ac 100644 --- a/appli_sf/tests/E2E/cypress/integration/FullDB/7-stats.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/FullDB/7-stats.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Page des stats', () => { if (Cypress.env('ENVIRONMENT') === 'dev') { before(() => { @@ -17,7 +11,6 @@ describe('Page des stats', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') }) it('Login', function () { diff --git a/appli_sf/tests/E2E/cypress/integration/FullDB/8-death-alert.spec.js b/appli_sf/tests/E2E/cypress/integration/FullDB/8-death-alert.spec.js index 1d54d79ebe5ed3ef199363e61ddbedd8154024e6..a13c1875f9872c9cea2ce7dccee47af53532fe92 100644 --- a/appli_sf/tests/E2E/cypress/integration/FullDB/8-death-alert.spec.js +++ b/appli_sf/tests/E2E/cypress/integration/FullDB/8-death-alert.spec.js @@ -1,9 +1,3 @@ -Cypress.on('uncaught:exception', (err, runnable) => { - // returning false here prevents Cypress from - // failing the test - return false -}) - describe('Alerte décès', () => { let deatAlertMail = 'alerte-deces@notaire.fr' @@ -19,7 +13,6 @@ describe('Alerte décès', () => { .then((user) => { this.userAdmin = user }) - Cypress.Cookies.preserveOnce('PHPSESSID') cy.deleteAllMails() }) diff --git a/appli_sf/tests/E2E/cypress/support/index.js b/appli_sf/tests/E2E/cypress/support/index.js index 0cff9543c2e3d3c0085e32df9657777d1ede6b1a..2bce01263baf9eebb2dbf980e085b5d8541af6bc 100644 --- a/appli_sf/tests/E2E/cypress/support/index.js +++ b/appli_sf/tests/E2E/cypress/support/index.js @@ -19,3 +19,8 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') + +Cypress.Cookies.defaults({ + preserve: 'PHPSESSID' +}) +