@@ -27,16 +27,22 @@ test.use({
27
27
test . describe ( "Dehydration" , ( ) => {
28
28
test . skip ( isDendrite , "does not yet support dehydration v2" ) ;
29
29
30
- test ( "'Set up secure backup' creates dehydrated device" , async ( { page, user, app } , workerInfo ) => {
31
- // Create a backup (which will create SSSS, and dehydrated device)
30
+ test ( "Verify device and reset creates dehydrated device" , async ( { page, user, credentials , app } , workerInfo ) => {
31
+ // Verify the device by resetting the key (which will create SSSS, and dehydrated device)
32
32
33
33
const securityTab = await app . settings . openUserSettings ( "Security & Privacy" ) ;
34
-
35
- await expect ( securityTab . getByRole ( "heading" , { name : "Secure Backup" } ) ) . toBeVisible ( ) ;
36
34
await expect ( securityTab . getByText ( "Offline device enabled" ) ) . not . toBeVisible ( ) ;
37
- await securityTab . getByRole ( "button" , { name : "Set up" , exact : true } ) . click ( ) ;
38
35
39
- await completeCreateSecretStorageDialog ( page ) ;
36
+ await app . closeDialog ( ) ;
37
+
38
+ // Verify the device by resetting the key
39
+ const settings = await app . settings . openUserSettings ( "Encryption" ) ;
40
+ await settings . getByRole ( "button" , { name : "Verify this device" } ) . click ( ) ;
41
+ await page . getByRole ( "button" , { name : "Proceed with reset" } ) . click ( ) ;
42
+ await page . getByRole ( "button" , { name : "Continue" } ) . click ( ) ;
43
+ await page . getByRole ( "button" , { name : "Copy" } ) . click ( ) ;
44
+ await page . getByRole ( "button" , { name : "Continue" } ) . click ( ) ;
45
+ await page . getByRole ( "button" , { name : "Done" } ) . click ( ) ;
40
46
41
47
await expectDehydratedDeviceEnabled ( app ) ;
42
48
0 commit comments