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,16 @@ 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 . 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
+ } ) ;
41
23
} ) ;
42
24
43
25
it ( "should not be ask to sign with TOTP" , function ( ) {
@@ -57,21 +39,16 @@ describe("delete TOTP connexion", () => {
57
39
58
40
cy . contains ( "Désactiver la validation en deux étapes" ) . click ( ) ;
59
41
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
+ } ) ;
75
52
} ) ;
76
53
77
54
it ( "should not be ask to sign with TOTP" , function ( ) {
0 commit comments