w3wallets 0.8.0 → 0.8.2

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/dist/index.js CHANGED
@@ -216,19 +216,22 @@ var Metamask = class extends Wallet {
216
216
  * @param mnemonic 12-word mnemonic seed phrase
217
217
  */
218
218
  async onboard(mnemonic, password = this.defaultPassword) {
219
- await this.page.getByTestId("onboarding-terms-checkbox").click();
219
+ await this.page.getByTestId("onboarding-get-started-button").click();
220
+ await this.page.getByTestId("terms-of-use-scroll-button").click();
221
+ await this.page.getByTestId("terms-of-use-checkbox").click();
222
+ await this.page.getByTestId("terms-of-use-agree-button").click();
220
223
  await this.page.getByTestId("onboarding-import-wallet").click();
221
- await this.page.getByTestId("metametrics-i-agree").click();
222
- for (const [i, word] of mnemonic.split(" ").entries())
223
- await this.page.getByTestId(`import-srp__srp-word-${i}`).fill(word);
224
+ await this.page.getByTestId("srp-input-import__srp-note").pressSequentially(mnemonic);
224
225
  await this.page.getByTestId("import-srp-confirm").click();
225
- await this.page.getByTestId("create-password-new").fill(password);
226
- await this.page.getByTestId("create-password-confirm").fill(password);
226
+ await this.page.getByTestId("create-password-new-input").fill(password);
227
+ await this.page.getByTestId("create-password-confirm-input").fill(password);
227
228
  await this.page.getByTestId("create-password-terms").click();
228
- await this.page.getByTestId("create-password-import").click();
229
+ await this.page.getByTestId("create-password-submit").click();
230
+ await this.page.getByTestId("metametrics-no-thanks").click();
229
231
  await this.page.getByTestId("onboarding-complete-done").click();
230
- await this.page.getByTestId("pin-extension-next").click();
231
232
  await this.page.getByTestId("pin-extension-done").click();
233
+ await this.page.getByTestId("unlock-password").fill(password);
234
+ await this.page.getByTestId("unlock-submit").click();
232
235
  await this.page.waitForTimeout(1e3);
233
236
  await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
234
237
  }
@@ -288,6 +291,9 @@ var Metamask = class extends Wallet {
288
291
  await p.locator(
289
292
  '[data-testid="confirm-footer-button"], [data-testid="confirm-btn"], [data-testid="page-container-footer-next"], [data-testid="confirmation-submit-button"]'
290
293
  ).click();
294
+ await p.waitForSelector(".main-container-wrapper:empty", {
295
+ timeout: 1e4
296
+ });
291
297
  await p.close();
292
298
  }
293
299
  async deny() {
package/dist/index.mjs CHANGED
@@ -182,19 +182,22 @@ var Metamask = class extends Wallet {
182
182
  * @param mnemonic 12-word mnemonic seed phrase
183
183
  */
184
184
  async onboard(mnemonic, password = this.defaultPassword) {
185
- await this.page.getByTestId("onboarding-terms-checkbox").click();
185
+ await this.page.getByTestId("onboarding-get-started-button").click();
186
+ await this.page.getByTestId("terms-of-use-scroll-button").click();
187
+ await this.page.getByTestId("terms-of-use-checkbox").click();
188
+ await this.page.getByTestId("terms-of-use-agree-button").click();
186
189
  await this.page.getByTestId("onboarding-import-wallet").click();
187
- await this.page.getByTestId("metametrics-i-agree").click();
188
- for (const [i, word] of mnemonic.split(" ").entries())
189
- await this.page.getByTestId(`import-srp__srp-word-${i}`).fill(word);
190
+ await this.page.getByTestId("srp-input-import__srp-note").pressSequentially(mnemonic);
190
191
  await this.page.getByTestId("import-srp-confirm").click();
191
- await this.page.getByTestId("create-password-new").fill(password);
192
- await this.page.getByTestId("create-password-confirm").fill(password);
192
+ await this.page.getByTestId("create-password-new-input").fill(password);
193
+ await this.page.getByTestId("create-password-confirm-input").fill(password);
193
194
  await this.page.getByTestId("create-password-terms").click();
194
- await this.page.getByTestId("create-password-import").click();
195
+ await this.page.getByTestId("create-password-submit").click();
196
+ await this.page.getByTestId("metametrics-no-thanks").click();
195
197
  await this.page.getByTestId("onboarding-complete-done").click();
196
- await this.page.getByTestId("pin-extension-next").click();
197
198
  await this.page.getByTestId("pin-extension-done").click();
199
+ await this.page.getByTestId("unlock-password").fill(password);
200
+ await this.page.getByTestId("unlock-submit").click();
198
201
  await this.page.waitForTimeout(1e3);
199
202
  await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
200
203
  }
@@ -254,6 +257,9 @@ var Metamask = class extends Wallet {
254
257
  await p.locator(
255
258
  '[data-testid="confirm-footer-button"], [data-testid="confirm-btn"], [data-testid="page-container-footer-next"], [data-testid="confirmation-submit-button"]'
256
259
  ).click();
260
+ await p.waitForSelector(".main-container-wrapper:empty", {
261
+ timeout: 1e4
262
+ });
257
263
  await p.close();
258
264
  }
259
265
  async deny() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "w3wallets",
3
3
  "description": "browser wallets for playwright",
4
- "version": "0.8.0",
4
+ "version": "0.8.2",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "homepage": "https://github.com/Maksandre/w3wallets",