-
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.
- Loading branch information
1 parent
bc4c527
commit ba23b26
Showing
9 changed files
with
268 additions
and
76 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 |
---|---|---|
@@ -1,17 +1,4 @@ | ||
describe("delete TOTP connexion", () => { | ||
before(() => { | ||
cy.mailslurp().then((mailslurp) => | ||
mailslurp.inboxController.deleteAllInboxEmails({ | ||
inboxId: "eab4ab97-875d-4ec7-bdcc-04323948ee63", | ||
}), | ||
); | ||
cy.mailslurp().then((mailslurp) => | ||
mailslurp.inboxController.deleteAllInboxEmails({ | ||
inboxId: "c9fabb94-9274-4ece-a3d0-54b1987c8588", | ||
}), | ||
); | ||
}); | ||
|
||
it("should delete TOTP application", function () { | ||
cy.visit("/connection-and-account"); | ||
|
||
|
@@ -23,21 +10,15 @@ describe("delete TOTP connexion", () => { | |
|
||
cy.contains("L’application d’authentification a bien été supprimée."); | ||
|
||
cy.mailslurp() | ||
// use inbox id and a timeout of 30 seconds | ||
.then((mailslurp) => | ||
mailslurp.waitForLatestEmail( | ||
"eab4ab97-875d-4ec7-bdcc-04323948ee63", | ||
60000, | ||
true, | ||
), | ||
) | ||
// check subject of deletion email | ||
.then((email) => { | ||
expect(email.subject).to.include( | ||
"Suppression d'une application d'authentification à double facteur", | ||
); | ||
}); | ||
cy.maildevGetLastMessage().then((email) => { | ||
expect(email.subject).to.equal( | ||
"Suppression d'une application d'authentification à double facteur", | ||
); | ||
cy.maildevVisitMessageById(email.id); | ||
cy.contains( | ||
"L'application a été supprimée comme étape de connexion à deux facteurs.", | ||
); | ||
}); | ||
}); | ||
|
||
it("should not be ask to sign with TOTP", function () { | ||
|
@@ -57,26 +38,22 @@ describe("delete TOTP connexion", () => { | |
|
||
cy.contains("Désactiver la validation en deux étapes").click(); | ||
|
||
cy.mailslurp() | ||
// use inbox id and a timeout of 30 seconds | ||
.then((mailslurp) => | ||
mailslurp.waitForLatestEmail( | ||
"c9fabb94-9274-4ece-a3d0-54b1987c8588", | ||
60000, | ||
true, | ||
), | ||
) | ||
// check subject of deletion email | ||
.then((email) => { | ||
expect(email.subject).to.include( | ||
"Désactivation de la validation en deux étapes", | ||
); | ||
}); | ||
cy.maildevGetLastMessage().then((email) => { | ||
console.log(email); | ||
|
||
expect(email.subject).to.equal( | ||
"Suppression d'une application d'authentification à double facteur", | ||
); | ||
cy.maildevVisitMessageById(email.id); | ||
cy.contains( | ||
"Votre compte MonComptePro n'est plus protégé par la validation en deux", | ||
); | ||
}); | ||
}); | ||
|
||
it("should not be ask to sign with TOTP", function () { | ||
cy.visit("http://localhost:4000"); | ||
cy.get("button.proconnect-button").click(); | ||
cy.get("button.œproconnect-button").click(); | ||
cy.login("[email protected]"); | ||
|
||
cy.contains('"amr": [\n "pwd"\n ],'); | ||
|
Oops, something went wrong.