-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RD: send mail notification when user delete his account (#634)
--------- Co-authored-by: Douglas DUTEIL <[email protected]>
- Loading branch information
1 parent
8fb4432
commit 6e4d30a
Showing
8 changed files
with
110 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
|
||
describe("delete account", () => { | ||
before(() => { | ||
cy.mailslurp().then((mailslurp) => | ||
mailslurp.inboxController.deleteAllInboxEmails({ | ||
inboxId: "4cec922b-ecbe-4a46-8511-fc9478c1efd0", | ||
}), | ||
); | ||
}); | ||
|
||
it("should delete account", function () { | ||
// Visit the signup page | ||
cy.visit(`/users/start-sign-in`); | ||
|
||
cy.get('[name="login"]').type( | ||
"[email protected]", | ||
); | ||
cy.get('[type="submit"]').click(); | ||
|
||
cy.get('[name="password"]').type("password123"); | ||
cy.get('[action="/users/sign-in"] [type="submit"]') | ||
.contains("S’identifier") | ||
.click(); | ||
|
||
cy.contains("Connexion et compte").click(); | ||
|
||
cy.contains("Suppression"); | ||
|
||
cy.contains("Supprimer mon compte").click(); | ||
|
||
cy.contains("Votre compte a bien été supprimé."); | ||
|
||
cy.mailslurp() | ||
// use inbox id and a timeout of 30 seconds | ||
.then((mailslurp) => | ||
mailslurp.waitForLatestEmail( | ||
"4cec922b-ecbe-4a46-8511-fc9478c1efd0", | ||
60000, | ||
true, | ||
), | ||
) | ||
// check subject of deletion email | ||
.then((email) => { | ||
expect(email.subject).to.include("Suppression de compte"); | ||
}); | ||
}); | ||
}); |
Empty file.
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,15 @@ | ||
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'); | ||
|
||
INSERT INTO organizations | ||
(id, siret, verified_email_domains, authorized_email_domains, created_at, updated_at) | ||
VALUES | ||
(1, '21340126800130', '{}', '{}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, is_external, verification_type, authentication_by_peers_type, has_been_greeted) | ||
VALUES | ||
(1, 1, false, 'verified_email_domain', 'all_members_notified', true); |
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 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,22 @@ | ||
Bonjour <%= given_name %> <%= family_name %>,<br /><br /> | ||
Nous vous confirmons que votre demande de suppression de compte a bien été prise | ||
en compte. Toutes vos données personnelles associées à ce compte ont été | ||
supprimées de notre système. | ||
<br /><br /> | ||
<strong> | ||
<a | ||
href="mailto:[email protected]?subject=Erreur%20-%20Mon%20organisation" | ||
style="text-decoration: underline; color: rgb(0, 0, 145)" | ||
> | ||
<u> | ||
Si vous avez des questions ou des préoccupations, n'hésitez pas à nous | ||
contacter. | ||
</u> | ||
</a> | ||
</strong> | ||
<br /><br /> | ||
Merci d'avoir utilisé MonComptePro. | ||
<br /><br /> | ||
Cordialement, | ||
<br /><br /> | ||
L’équipe MonComptePro |