-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EN-4026) chore(forms): implement react hook forms (#140)
* [EN-5923] chore(inputs): WIP remove old inputs * [EN-5923] chore(inputs): removed all old inputs and modified last old creatable select * [EN-4026] chore(inputs): added react hook forms and started implementing * [EN-4026] chore(inputs): theoretically finished implements react-hook-form 😇 * [EN-4026] chore(inputs): started watch * [EN-4026] chore(inputs): typed form schema * [EN-4026] chore(inputs): put some styles in common * [EN-4026] chore(inputs): fixed async radio and styles * [EN-4026] chore(inputs): modified rules and rule manager. Typing * [EN-4026] chore(inputs): try typing * [EN-4026] chore(inputs): try typing * [EN-4026] chore(inputs): came back to first solution * [EN-4026] chore(inputs): finished mostly all the errors * [EN-4026] chore(inputs): start testing * wip * [EN-4026] chore(inputs): continue testing * [EN-4026] chore(inputs): continue testing * [EN-4026] chore(inputs): continue testing * [EN-4026] chore(inputs): continue testing * [EN-4026] chore(inputs): continue testing * [EN-4026] chore(inputs): fixed jest tests and fixed error messages if they are too long * [EN-4026] chore(inputs): finished tests * [EN-4026] chore(inputs): finished typing 🚀 * [EN-4026] chore(inputs): updated FooterForm 🚀 * [EN-4026] tests(inputs): fix * [EN-4026] tests(navigation): added test for main page navigation * fix(donation link): change donation link * fix(members): fix call with undefined role in members as admin * [EN-4026] chore(navigation): pass components using forms in typescript * pr feedback
- Loading branch information
Showing
243 changed files
with
8,193 additions
and
10,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,6 @@ describe('Candidat', () => { | |
|
||
cy.intercept('PUT', '/user/changePwd', {}).as('changePwd'); | ||
}); | ||
|
||
it('should open backoffice public offers', () => { | ||
cy.visit('/backoffice/candidat/offres/public', { | ||
onBeforeLoad: function async(window) { | ||
|
@@ -130,31 +129,43 @@ describe('Candidat', () => { | |
); | ||
}); | ||
cy.get('[data-testid="candidat-add-offer-main"]').click(); | ||
cy.get('#form-offer-external-title').scrollIntoView().type('test'); | ||
cy.get('#form-offer-external-company').scrollIntoView().type('test'); | ||
cy.get('#form-offer-external-department-container') | ||
cy.get('#form-add-offer-external-title').scrollIntoView().type('test'); | ||
cy.get('#form-add-offer-external-company').scrollIntoView().type('test'); | ||
|
||
cy.get('#form-add-offer-external-department') | ||
.should('be.visible') | ||
.scrollIntoView() | ||
.type('Par'); | ||
|
||
cy.get('#form-add-offer-external-department') | ||
.find('.Select__menu') | ||
.should('be.visible') | ||
.scrollIntoView() | ||
.find('.Select__option') | ||
.contains('Paris (75)') | ||
.click(); | ||
cy.get( | ||
'#form-offer-external-department-container .options-container .option button' | ||
) | ||
.first() | ||
.click(); | ||
cy.get('#form-offer-external-contract-container').scrollIntoView().click(); | ||
cy.get( | ||
'#form-offer-external-contract-container .options-container .option button' | ||
) | ||
.first() | ||
|
||
cy.get('#form-add-offer-external-contract-container') | ||
.should('be.visible') | ||
.scrollIntoView() | ||
.click() | ||
.find('.option') | ||
.contains('CDI') | ||
.click(); | ||
cy.get('#form-offer-external-recruiterFirstName') | ||
|
||
cy.get('#form-add-offer-external-recruiterFirstName') | ||
.scrollIntoView() | ||
.type('test'); | ||
cy.get('#form-add-offer-external-recruiterName') | ||
.scrollIntoView() | ||
.type('test'); | ||
cy.get('#form-offer-external-recruiterName').scrollIntoView().type('test'); | ||
cy.get('#form-offer-external-recruiterMail') | ||
cy.get('#form-add-offer-external-recruiterMail') | ||
.scrollIntoView() | ||
.type('[email protected]'); | ||
cy.get('#form-offer-external-description').scrollIntoView().type('test'); | ||
cy.get('#form-offer-external-link').scrollIntoView().type('test'); | ||
cy.get('#form-add-offer-external-description') | ||
.scrollIntoView() | ||
.type('test'); | ||
cy.get('#form-add-offer-external-link').scrollIntoView().type('test'); | ||
cy.get('button').contains('Envoyer').click(); | ||
cy.wait('@postExternal'); | ||
|
||
|
@@ -169,10 +180,10 @@ describe('Candidat', () => { | |
window.localStorage.setItem('release-version', 'v100'); | ||
}, | ||
}); | ||
cy.get(`[data-testid="test-catchphrase-edit-icon"]`).click({ force: true }); | ||
cy.get(`[data-testid="test-catchphrase-edit-icon"]`).click(); | ||
const catchPhrase = 'hello my name is Mike'; | ||
cy.get('#form-catchphrase-catchphrase').type(catchPhrase); | ||
cy.get(`[data-testid="form-confirm-catchphrase-form"]`).click(); | ||
cy.get(`[data-testid="form-confirm-form-catchphrase"]`).click(); | ||
cy.get(`[data-testid="cv-edit-catchphrase-content"]`).should( | ||
'contain', | ||
catchPhrase | ||
|
@@ -189,33 +200,36 @@ describe('Candidat', () => { | |
}); | ||
|
||
// toggle hide CV | ||
cy.get(`[data-testid="test-toggle-hidden"]`).click({ force: true }); | ||
cy.get('label[for="ent-toggle-hidden"]').click(); | ||
cy.get(`[data-testid="test-confirm-hidden"]`).click(); | ||
cy.wait('@putCandidatParams'); | ||
cy.get(`[data-testid="test-toggle-hidden"]`).should('be.checked'); | ||
cy.get(`[data-testid="test-toggle-hidden"]`) | ||
.click({ force: true }) | ||
.should('not.be.checked'); | ||
cy.get('label[for="ent-toggle-hidden"]').click(); | ||
cy.get(`[data-testid="test-toggle-hidden"]`).should('not.be.checked'); | ||
|
||
// toggle is employed | ||
cy.get(`[data-testid="test-toggle-employedToggle"]`).click({ force: true }); | ||
cy.get('#form-edit-employed-contract').select('alt'); | ||
cy.get('label[for="ent-toggle-employedToggle"]').click(); | ||
|
||
cy.get('#form-edit-employed-contract-container') | ||
.should('be.visible') | ||
.scrollIntoView() | ||
.click() | ||
.find('.option') | ||
.contains('Alternance') | ||
.click(); | ||
cy.get('#form-edit-employed-endOfContract').type('2024-03-03'); | ||
cy.contains('Valider').click(); | ||
cy.wait('@putCandidatParams'); | ||
cy.get(`[data-testid="test-toggle-employedToggle"]`).should('be.checked'); | ||
cy.get(`[data-testid="test-toggle-employedToggle"]`) | ||
.click({ force: true }) | ||
.should('not.be.checked'); | ||
cy.get('label[for="ent-toggle-employedToggle"]').click(); | ||
cy.get(`[data-testid="test-toggle-employedToggle"]`).should( | ||
'not.be.checked' | ||
); | ||
|
||
// change password | ||
cy.get('#form-change-pwd-oldPassword').type('blablabla', { force: true }); | ||
cy.get('#form-change-pwd-newPassword').type('Linkedout123!', { | ||
force: true, | ||
}); | ||
cy.get('#form-change-pwd-confirmPassword').type('Linkedout123!', { | ||
force: true, | ||
}); | ||
cy.get('#form-change-pwd-oldPassword').type('blablabla'); | ||
cy.get('#form-change-pwd-newPassword').type('Linkedout123!'); | ||
cy.get('#form-change-pwd-confirmPassword').type('Linkedout123!'); | ||
cy.contains('Modifier').click(); | ||
cy.wait('@changePwd'); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.