Skip to content

Commit f7937b2

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

File tree

11 files changed

+281
-78
lines changed

11 files changed

+281
-78
lines changed

cypress/e2e/delete_totp/index.cy.ts

Lines changed: 20 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,16 @@ 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.maildevGetLastMessage().then((email) => {
14+
expect(email.subject).to.equal(
15+
"Suppression d'une application d'authentification à double facteur",
16+
);
17+
cy.maildevVisitMessageById(email.id);
18+
cy.contains(
19+
"L'application a été supprimée comme étape de connexion à deux facteurs.",
20+
);
21+
cy.maildevDeleteMessageById(email.id);
22+
});
4123
});
4224

4325
it("should not be ask to sign with TOTP", function () {
@@ -57,21 +39,16 @@ describe("delete TOTP connexion", () => {
5739

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

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-
});
42+
cy.maildevGetLastMessage().then((email) => {
43+
expect(email.subject).to.equal(
44+
"Désactivation de la validation en deux étapes",
45+
);
46+
cy.maildevVisitMessageById(email.id);
47+
cy.contains(
48+
"Votre compte ProConnect n'est plus protégé par la validation en deux étapes.",
49+
);
50+
cy.maildevDeleteMessageById(email.id);
51+
});
7552
});
7653

7754
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)