Skip to content

Commit

Permalink
[EN-6218] fix(tests): try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emile-bex committed Jul 21, 2023
1 parent 8bf85cb commit 8094fd1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/candidat.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Candidat', () => {
});

it('should open backoffice public offers', () => {
cy.visit('/backoffice/candidat/offres', {
cy.visit('/backoffice/candidat/offres/public', {
onBeforeLoad: function async(window) {
window.localStorage.setItem('access-token', '1234');
window.localStorage.setItem('release-version', 'v100');
Expand Down Expand Up @@ -115,8 +115,8 @@ describe('Candidat', () => {
});
});

it('should open backoffice public offers and add new opportunity', () => {
cy.visit('/backoffice/candidat/offres', {
it('should open backoffice private offers and add new opportunity', () => {
cy.visit('/backoffice/candidat/offres/private', {
onBeforeLoad: function async(window) {
window.localStorage.setItem('access-token', '1234');
window.localStorage.setItem('release-version', 'v100');
Expand Down
5 changes: 4 additions & 1 deletion cypress/e2e/parcours-cv.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Parcours CV', () => {
fixture: 'opportunity-res',
}).as('postOpportunity');

cy.intercept('POST', '/cv/count').as('postCVCount');
cy.intercept('POST', '/cv/count', {}).as('postCVCount');

cy.intercept('POST', '/externalMessage', {
fixture: 'post-external-message-res',
Expand All @@ -28,6 +28,9 @@ describe('Parcours CV', () => {
}).as('getCandidats');

cy.intercept('GET', '/cv/shares', { total: 184222 }).as('cvShares');
cy.intercept('GET', '/cv/published', { nbPublishedCVs: 2 }).as(
'cvPublished'
);
});

it('Ouvrir les filtres et checker Paris', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/cv/CVCallToActions/CVCallToActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const CVCallToActions = ({
} soutenir dans sa recherche d'emploi`}
submitText="Envoyer"
formSchema={formSendExternalMessage}
onSubmit={async ({ optIn, ...fields }, closeModal) => {
onSubmit={async (fields, closeModal) => {
gaEvent(GA_TAGS.PAGE_CV_ENVOYER_CONTACTEZ_MOI_CLIC);
fbEvent(FB_TAGS.MESSAGE_SEND);
try {
Expand Down

0 comments on commit 8094fd1

Please sign in to comment.