-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(email): add update personal info smtp email
- Loading branch information
1 parent
932809a
commit a8c0823
Showing
6 changed files
with
26 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ INSERT INTO users | |
(id, email, email_verified, email_verified_at, encrypted_password, created_at, updated_at, given_name, family_name, | ||
phone_number, job) | ||
VALUES | ||
(1, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Rebibi', 'Dumama', '0123456789', 'Sbirette'); | ||
(1, '[email protected]', true, CURRENT_TIMESTAMP, '$2a$10$kzY3LINL6..50Fy9shWCcuNlRfYq0ft5lS.KCcJ5PzrhlWfKK4NIO', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Konrad', 'Curze', '0404040404', 'Primarque'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, created_at, updated_at) | ||
|
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 |
---|---|---|
@@ -1,48 +1,37 @@ | ||
describe("Signup into new entreprise unipersonnelle", () => { | ||
before(() => { | ||
cy.mailslurp().then((mailslurp) => | ||
mailslurp.inboxController.deleteAllInboxEmails({ | ||
inboxId: "9023e9f4-4e54-4ba0-9558-3cb61e7608c6", | ||
}), | ||
); | ||
}); | ||
|
||
it("Should send email when user updates personal information", function () { | ||
cy.visit("/personal-information"); | ||
|
||
cy.login("[email protected]"); | ||
cy.login("[email protected]"); | ||
|
||
cy.visit("/personal-information"); | ||
|
||
cy.contains("Vos informations personnelles"); | ||
|
||
cy.get('input[name="given_name"]').clear().type("Mister Rebecco"); | ||
cy.get('input[name="given_name"]').clear().type("Night"); | ||
cy.get('input[name="family_name"]').clear().type("Haunter"); | ||
|
||
cy.get('[type="submit"]').contains("Mettre à jour").click(); | ||
|
||
cy.contains("Vos informations ont été mises à jour."); | ||
|
||
cy.mailslurp() | ||
// use inbox id and a timeout of 30 seconds | ||
.then((mailslurp) => | ||
mailslurp.waitForLatestEmail( | ||
"9023e9f4-4e54-4ba0-9558-3cb61e7608c6", | ||
60000, | ||
true, | ||
), | ||
) | ||
// check subject of deletion email | ||
.then((email) => { | ||
expect(email.subject).to.include( | ||
"Mise à jour de vos données personnelles", | ||
); | ||
}); | ||
cy.maildevGetMessageBySubject( | ||
"Mise à jour de vos données personnelles", | ||
).then((email) => { | ||
cy.maildevVisitMessageById(email.id); | ||
cy.contains( | ||
"Nous vous informons que vos données personnelles ont été mises à jour avec succès.", | ||
); | ||
cy.contains("Prénom : Night"); | ||
cy.contains("Nom de famille : Haunter"); | ||
cy.maildevDeleteMessageById(email.id); | ||
}); | ||
}); | ||
|
||
it("should show an error where putting invalid names or job", () => { | ||
cy.visit("/personal-information"); | ||
|
||
cy.login("[email protected]"); | ||
cy.login("[email protected]"); | ||
|
||
["given_name", "family_name", "job"].forEach((inputName) => { | ||
cy.get(`input[name="${inputName}"]`).clear().type(""); | ||
|
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
This file was deleted.
Oops, something went wrong.