Skip to content

Commit

Permalink
Merge pull request #1083 from MTES-MCT/test-fix-e2e-tests
Browse files Browse the repository at this point in the history
Fix e2e tests
  • Loading branch information
Falinor authored Jan 8, 2025
2 parents d960d54 + 63b5fe8 commit 0823b72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/cypress/e2e/campaign.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ describe('Campaign', () => {
it('should create a campaign', () => {
cy.intercept({
method: 'GET',
url: Cypress.env('API') + '/housing?*'
url: Cypress.env('API') + '/housing*'
}).as('findHousings');
cy.intercept('POST', Cypress.env('API') + '/housing/count').as(
cy.intercept('GET', Cypress.env('API') + '/housing/count*').as(
'countHousings'
);
cy.intercept('POST', Cypress.env('API') + '/files').as('upload');
Expand Down
6 changes: 4 additions & 2 deletions e2e/cypress/e2e/sign-up.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { faker } from '@faker-js/faker/locale/fr';

const VALID_PASSWORD = '1234QWERasdf';

describe('Sign up', () => {
it('should sign up', () => {
cy.visit('/connexion');
Expand Down Expand Up @@ -38,11 +40,11 @@ describe('Sign up', () => {
cy.get('label')
.contains(/Définissez votre mot de passe/i)
.next()
.type('123QWEasd');
.type(VALID_PASSWORD);
cy.get('label')
.contains(/Confirmez votre mot de passe/i)
.next()
.type('123QWEasd{enter}');
.type(`${VALID_PASSWORD}{enter}`);

cy.get('button')
.contains(/Créer mon compte/i)
Expand Down

0 comments on commit 0823b72

Please sign in to comment.