1
1
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
-
15
2
it ( "should delete TOTP application" , function ( ) {
16
3
cy . visit ( "/connection-and-account" ) ;
17
4
@@ -23,21 +10,15 @@ describe("delete TOTP connexion", () => {
23
10
24
11
cy . contains ( "L’application d’authentification a bien été supprimée." ) ;
25
12
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
+ } ) ;
41
22
} ) ;
42
23
43
24
it ( "should not be ask to sign with TOTP" , function ( ) {
@@ -57,21 +38,15 @@ describe("delete TOTP connexion", () => {
57
38
58
39
cy . contains ( "Désactiver la validation en deux étapes" ) . click ( ) ;
59
40
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
+ } ) ;
75
50
} ) ;
76
51
77
52
it ( "should not be ask to sign with TOTP" , function ( ) {
0 commit comments