Skip to content

Commit 23c8094

Browse files
committed
feat(email): use smtp protocol
1 parent bc4c527 commit 23c8094

File tree

16 files changed

+329
-80
lines changed

16 files changed

+329
-80
lines changed

cypress/e2e/delete_totp/index.cy.ts

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
describe("delete TOTP connexion", () => {
2-
before(() => {
3-
cy.mailslurp().then((mailslurp) =>
4-
mailslurp.inboxController.deleteAllInboxEmails({
5-
inboxId: "eab4ab97-875d-4ec7-bdcc-04323948ee63",
6-
}),
7-
);
8-
cy.mailslurp().then((mailslurp) =>
9-
mailslurp.inboxController.deleteAllInboxEmails({
10-
inboxId: "c9fabb94-9274-4ece-a3d0-54b1987c8588",
11-
}),
12-
);
13-
});
14-
152
it("should delete TOTP application", function () {
163
cy.visit("/connection-and-account");
174

@@ -23,21 +10,15 @@ describe("delete TOTP connexion", () => {
2310

2411
cy.contains("L’application d’authentification a bien été supprimée.");
2512

26-
cy.mailslurp()
27-
// use inbox id and a timeout of 30 seconds
28-
.then((mailslurp) =>
29-
mailslurp.waitForLatestEmail(
30-
"eab4ab97-875d-4ec7-bdcc-04323948ee63",
31-
60000,
32-
true,
33-
),
34-
)
35-
// check subject of deletion email
36-
.then((email) => {
37-
expect(email.subject).to.include(
38-
"Suppression d'une application d'authentification à double facteur",
39-
);
40-
});
13+
cy.maildevGetMessageBySubject(
14+
"Suppression d'une application d'authentification à double facteur",
15+
).then((email) => {
16+
cy.maildevVisitMessageById(email.id);
17+
cy.contains(
18+
"L'application a été supprimée comme étape de connexion à deux facteurs.",
19+
);
20+
cy.maildevDeleteMessageById(email.id);
21+
});
4122
});
4223

4324
it("should not be ask to sign with TOTP", function () {
@@ -57,21 +38,15 @@ describe("delete TOTP connexion", () => {
5738

5839
cy.contains("Désactiver la validation en deux étapes").click();
5940

60-
cy.mailslurp()
61-
// use inbox id and a timeout of 30 seconds
62-
.then((mailslurp) =>
63-
mailslurp.waitForLatestEmail(
64-
"c9fabb94-9274-4ece-a3d0-54b1987c8588",
65-
60000,
66-
true,
67-
),
68-
)
69-
// check subject of deletion email
70-
.then((email) => {
71-
expect(email.subject).to.include(
72-
"Désactivation de la validation en deux étapes",
73-
);
74-
});
41+
cy.maildevGetMessageBySubject(
42+
"Désactivation de la validation en deux étapes",
43+
).then((email) => {
44+
cy.maildevVisitMessageById(email.id);
45+
cy.contains(
46+
"Votre compte ProConnect n'est plus protégé par la validation en deux étapes.",
47+
);
48+
cy.maildevDeleteMessageById(email.id);
49+
});
7550
});
7651

7752
it("should not be ask to sign with TOTP", function () {

package-lock.json

Lines changed: 200 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)