@deeeed/metamask-harness 0.92.18 → 0.92.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.92.19 - 2026-10-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Mobile `metamask.wallet.import` confirms the 8.17 password warning sheet after Create password, and still accepts the password checkbox on earlier releases.
|
|
10
|
+
|
|
5
11
|
## 0.92.18 - 2026-10-16
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Submit the Mobile recovery-phrase import password on both onboarding variants.
|
|
2
|
+
// Releases before 8.17 gate Create password behind a checkbox; 8.17 (mobile #37398) shows the
|
|
3
|
+
// same warning as a bottom sheet after Create password and imports only once it is confirmed.
|
|
4
|
+
const IMPORT_PASSWORD_TEST_IDS = {
|
|
5
|
+
passwordTerms: 'password-understand-box',
|
|
6
|
+
createPassword: 'submit-button',
|
|
7
|
+
passwordWarningConfirm: 'password-reset-warning-sheet-confirm-button',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// `driver.pressIfPresent(testId)` presses a visible control and resolves false when it is absent.
|
|
11
|
+
export async function submitImportPassword(driver, timeoutMs) {
|
|
12
|
+
const acceptedCheckbox = await driver.pressIfPresent(IMPORT_PASSWORD_TEST_IDS.passwordTerms);
|
|
13
|
+
await driver.press(IMPORT_PASSWORD_TEST_IDS.createPassword, timeoutMs);
|
|
14
|
+
if (!acceptedCheckbox) {
|
|
15
|
+
await driver.press(IMPORT_PASSWORD_TEST_IDS.passwordWarningConfirm, timeoutMs);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from '../platform/bridge.mjs';
|
|
14
14
|
import { setMobileConsent } from '../analytics/consent-settings.mjs';
|
|
15
15
|
import { ensureUnlocked } from './ensure_unlocked.mjs';
|
|
16
|
+
import { submitImportPassword } from './import-password.mjs';
|
|
16
17
|
import { importWalletThroughNativeUi, isOpaqueMobileRuntime } from './native-ui.mjs';
|
|
17
18
|
|
|
18
19
|
const TEST_IDS = {
|
|
@@ -22,8 +23,6 @@ const TEST_IDS = {
|
|
|
22
23
|
continue: 'import-from-seed-screen-continue-button-id',
|
|
23
24
|
password: 'create-password-first-input-field',
|
|
24
25
|
confirmPassword: 'create-password-second-input-field',
|
|
25
|
-
passwordTerms: 'password-understand-box',
|
|
26
|
-
createPassword: 'submit-button',
|
|
27
26
|
metricsCheckbox: 'optin-metrics-metrics-checkbox',
|
|
28
27
|
metricsContinue: 'optin-metrics-continue-button-id',
|
|
29
28
|
interestSkip: 'onboarding-interest-skip-button',
|
|
@@ -173,8 +172,10 @@ async function importThroughUi(input, timeoutMs, options) {
|
|
|
173
172
|
await press(input, TEST_IDS.continue, timeoutMs);
|
|
174
173
|
await setSecretInput(input, TEST_IDS.password, credentials.password, timeoutMs);
|
|
175
174
|
await setSecretInput(input, TEST_IDS.confirmPassword, credentials.password, timeoutMs);
|
|
176
|
-
await
|
|
177
|
-
|
|
175
|
+
await submitImportPassword({
|
|
176
|
+
pressIfPresent: (testId) => pressIfPresent(input, testId),
|
|
177
|
+
press: (testId, ms) => press(input, testId, ms),
|
|
178
|
+
}, timeoutMs);
|
|
178
179
|
|
|
179
180
|
const postPassword = await waitForPostPasswordScreen(input, timeoutMs);
|
|
180
181
|
if (postPassword.route === 'OptinMetrics') {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
nativeAppId,
|
|
8
8
|
nativeSessionName,
|
|
9
9
|
} from '../platform/native-session-name.mjs';
|
|
10
|
+
import { submitImportPassword } from './import-password.mjs';
|
|
10
11
|
|
|
11
12
|
const TEST_IDS = {
|
|
12
13
|
existingWallet: 'wallet-setup-screen-have-an-existing-wallet-button-id',
|
|
@@ -15,8 +16,6 @@ const TEST_IDS = {
|
|
|
15
16
|
continue: 'import-from-seed-screen-continue-button-id',
|
|
16
17
|
password: 'create-password-first-input-field',
|
|
17
18
|
confirmPassword: 'create-password-second-input-field',
|
|
18
|
-
passwordTerms: 'password-understand-box',
|
|
19
|
-
createPassword: 'submit-button',
|
|
20
19
|
metricsCheckbox: 'optin-metrics-metrics-checkbox',
|
|
21
20
|
metricsContinue: 'optin-metrics-continue-button-id',
|
|
22
21
|
interestSkip: 'onboarding-interest-skip-button',
|
|
@@ -139,8 +138,14 @@ export async function importWalletThroughNativeUi(input, credentials, options) {
|
|
|
139
138
|
await native.fill(TEST_IDS.password, credentials.password, options.timeoutMs);
|
|
140
139
|
await native.fill(TEST_IDS.confirmPassword, credentials.password, options.timeoutMs);
|
|
141
140
|
await native.dismissKeyboard();
|
|
142
|
-
await
|
|
143
|
-
|
|
141
|
+
await submitImportPassword({
|
|
142
|
+
async pressIfPresent(testId) {
|
|
143
|
+
if (!await native.exists(testId, 3000)) return false;
|
|
144
|
+
await native.press(testId, options.timeoutMs);
|
|
145
|
+
return true;
|
|
146
|
+
},
|
|
147
|
+
press: (testId, timeoutMs) => native.press(testId, timeoutMs),
|
|
148
|
+
}, options.timeoutMs);
|
|
144
149
|
}
|
|
145
150
|
const onboarding = await native.completeOnboarding(options);
|
|
146
151
|
return {
|