7
7
import { FLOWS } from "./flows" ;
8
8
import { addVirtualAuthenticator , runInBrowser } from "./util" ;
9
9
10
- import { II_URL , DEVICE_NAME1 } from "./constants" ;
10
+ import { II_URL , DEVICE_NAME1 , RECOVERY_PHRASE_NAME } from "./constants" ;
11
11
12
12
test ( "Recover access, after registration" , async ( ) => {
13
13
await runInBrowser ( async ( browser : WebdriverIO . Browser ) => {
@@ -46,16 +46,15 @@ test("Remove unprotected recovery phrase", async () => {
46
46
await FLOWS . addRecoveryMechanismSeedPhrase ( browser ) ;
47
47
await mainView . waitForDisplay ( ) ;
48
48
49
- const recoveryAlias = "Recovery phrase" ;
50
- await mainView . waitForDeviceDisplay ( recoveryAlias ) ;
51
- await mainView . deviceSettings ( recoveryAlias ) ;
49
+ await mainView . waitForDeviceDisplay ( RECOVERY_PHRASE_NAME ) ;
50
+ await mainView . deviceSettings ( RECOVERY_PHRASE_NAME ) ;
52
51
53
52
const settingsView = new DeviceSettingsView ( browser ) ;
54
53
await settingsView . waitForDisplay ( ) ;
55
54
await settingsView . remove ( ) ;
56
55
await browser . acceptAlert ( ) ;
57
56
58
- await mainView . waitForDeviceNotDisplay ( recoveryAlias ) ;
57
+ await mainView . waitForDeviceNotDisplay ( RECOVERY_PHRASE_NAME ) ;
59
58
} ) ;
60
59
} , 300_000 ) ;
61
60
@@ -69,8 +68,7 @@ test("Make recovery protected", async () => {
69
68
const seedPhrase = await FLOWS . addRecoveryMechanismSeedPhrase ( browser ) ;
70
69
await mainView . waitForDisplay ( ) ;
71
70
72
- const recoveryAlias = "Recovery phrase" ;
73
- await mainView . deviceSettings ( recoveryAlias ) ;
71
+ await mainView . deviceSettings ( RECOVERY_PHRASE_NAME ) ;
74
72
75
73
const settingsView = new DeviceSettingsView ( browser ) ;
76
74
await settingsView . waitForDisplay ( ) ;
@@ -88,8 +86,7 @@ test("Remove protected recovery phrase", async () => {
88
86
const seedPhrase = await FLOWS . addRecoveryMechanismSeedPhrase ( browser ) ;
89
87
await mainView . waitForDisplay ( ) ;
90
88
91
- const recoveryAlias = "Recovery phrase" ;
92
- await mainView . deviceSettings ( recoveryAlias ) ;
89
+ await mainView . deviceSettings ( RECOVERY_PHRASE_NAME ) ;
93
90
94
91
const settingsView = new DeviceSettingsView ( browser ) ;
95
92
await settingsView . waitForDisplay ( ) ;
@@ -104,7 +101,7 @@ test("Remove protected recovery phrase", async () => {
104
101
await recoveryView . enterSeedPhrase ( seedPhrase ) ;
105
102
await recoveryView . enterSeedPhraseContinue ( ) ;
106
103
await mainView . waitForDisplay ( ) ;
107
- await mainView . waitForDeviceNotDisplay ( recoveryAlias ) ;
104
+ await mainView . waitForDeviceNotDisplay ( RECOVERY_PHRASE_NAME ) ;
108
105
} ) ;
109
106
} , 300_000 ) ;
110
107
@@ -118,8 +115,7 @@ test("Remove protected recovery phrase, confirm with empty seed phrase", async (
118
115
const seedPhrase = await FLOWS . addRecoveryMechanismSeedPhrase ( browser ) ;
119
116
await mainView . waitForDisplay ( ) ;
120
117
121
- const recoveryAlias = "Recovery phrase" ;
122
- await mainView . deviceSettings ( recoveryAlias ) ;
118
+ await mainView . deviceSettings ( RECOVERY_PHRASE_NAME ) ;
123
119
124
120
const settingsView = new DeviceSettingsView ( browser ) ;
125
121
await settingsView . waitForDisplay ( ) ;
0 commit comments