Commit 4075b90b authored by Cédric Girardot's avatar Cédric Girardot

Refactor : Déplace "preserve cookie" dans support/index.js

Change-Id: Ie5620b4200a5b5b04907d8bd61af885784b0311d
parent ab099610
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\/?$/)
......
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 () {
......
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 () {
......
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()
})
......
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 () {
......
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()
})
......
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 () {
......
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()
})
......
......@@ -19,3 +19,8 @@ import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
Cypress.Cookies.defaults({
preserve: 'PHPSESSID'
})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment