Skip to content

Commit

Permalink
[EN-4026] tests(navigation): added test for main page navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
emile-bex committed Aug 22, 2023
1 parent 5965096 commit 47caa7c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 35 deletions.
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ module.exports = defineConfig({
// implement node event listeners here
},
},
retries: 5,
retries: 3,
});
40 changes: 40 additions & 0 deletions cypress/e2e/nav.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* eslint-disable no-undef */
// unstable test, need to identify the issue

describe('Navigation', () => {
it('opens', () => {
cy.visit('/');
cy.wait(1000);

// cy.visit(Cypress.env('base_url'))
cy.get('header').within(() => {
cy.get('a').contains('Je cherche un emploi').click({ force: true });
cy.wait(1000);
cy.url().should('include', 'travailler');
});

cy.get('header').within(() => {
cy.get('a').contains('Je recrute').click({ force: true });
cy.wait(1000);
cy.url().should('include', 'entreprises');
});

cy.get('header').within(() => {
cy.get('a').contains('Je veux aider').click({ force: true });
cy.wait(1000);
cy.url().should('include', 'aider');
});

cy.get('header').within(() => {
cy.get('a').contains("J'oriente un candidat").click({ force: true });
cy.wait(1000);
cy.url().should('include', 'orienter');
});

cy.get('header').within(() => {
cy.get('button').contains('Découvrir les CV').click({ force: true });
cy.wait(1000);
cy.url().should('include', 'candidats');
});
});
});
29 changes: 0 additions & 29 deletions cypress/e2e/nav.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/forms/schemas/formAddExternalOpportunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const formAddExternalOpportunityCandidate: FormSchema<{
name: 'description',
component: 'textarea',
title:
'Ecrire ou copier le detail de l’offre pour faciliter le suivi de votre candidature',
'Ecrire ou copier le detail de l’offre pour faciliter le suivi de votre candidature*',
isRequired: true,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const formEditExternalOpportunityAsAdmin: FormSchema<{
name: 'description',
component: 'textarea',
title:
'Ecrire ou copier le detail de l’offre pour faciliter le suivi de votre candidature',
'Ecrire ou copier le detail de l’offre pour faciliter le suivi de votre candidature*',
isRequired: true,
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/components/utils/Inputs/Inputs.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const commonMenuOptionStyles = css`
export const commonInputContainerStyles = css`
font-family: Poppins, sans-serif !important;
max-width: 100%;
background-color: ${COLORS.white};
background-color: transparent;
display: flex;
flex-direction: column;
position: relative;
Expand Down Expand Up @@ -73,6 +73,7 @@ export const StyledLimit = styled.div`
text-align: right;
align-self: flex-end;
min-height: 30px;
display: flex;
> * {
padding-top: 5px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/utils/Inputs/Selects/Selects.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const StyledSelect = styled.div`
}
& .Select__control--is-focused {
background-color: ${COLORS.white} !important;
background-color: transparent !important;
box-shadow: none !important;
border: none !important;
border-radius: 0 !important;
Expand Down Expand Up @@ -72,7 +72,7 @@ export const StyledSelect = styled.div`
}
& .Select__control {
background-color: ${COLORS.white};
background-color: transparent;
min-height: 30px;
border: none;
border-bottom: solid 2px ${COLORS.gray} !important;
Expand Down

0 comments on commit 47caa7c

Please sign in to comment.