From 6aaee51e6a650ed4ef38fdd601a2d09ed1b1886d Mon Sep 17 00:00:00 2001 From: Rabi Siddique <60459172+rabi-siddique@users.noreply.github.com> Date: Thu, 23 May 2024 19:33:13 +0500 Subject: [PATCH 1/2] release: @agoric/synpress 3.8.2 (#46) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8006aac3..ad3e10912 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agoric/synpress", - "version": "3.8.1", + "version": "3.8.2", "description": "Synpress is e2e testing framework based around Cypress.io & playwright with included MetaMask support. Test your dapps with ease.", "keywords": [ "Synpress", From c3662572dc36b6a758a6240b83548b166b42b53f Mon Sep 17 00:00:00 2001 From: Fraz Arshad Date: Mon, 10 Jun 2024 16:24:49 +0500 Subject: [PATCH 2/2] refactor: removed newAccount param from setupWallet --- commands/keplr.js | 17 ++--------------- pages/keplr/first-time-flow-page.js | 2 -- plugins/keplr-plugin.js | 2 -- support/commands.js | 2 -- support/index.d.ts | 1 - tests/e2e/specs/keplr/keplr-spec.js | 3 +-- 6 files changed, 3 insertions(+), 24 deletions(-) diff --git a/commands/keplr.js b/commands/keplr.js index 9f44eb8b9..4372aa918 100644 --- a/commands/keplr.js +++ b/commands/keplr.js @@ -178,31 +178,20 @@ const keplr = { async importWallet( secretWordsOrPrivateKey, password, - newAccount, walletName, selectedChains, ) { await module.exports.goToRegistration(); await playwright.waitAndClickByText( - newAccount - ? onboardingElements.createWalletButton - : onboardingElements.existingWalletButton, + onboardingElements.existingWalletButton, await playwright.keplrWindow(), ); await playwright.waitAndClickByText( - newAccount - ? onboardingElements.importRecoveryPhraseButton - : onboardingElements.useRecoveryPhraseButton, + onboardingElements.useRecoveryPhraseButton, await playwright.keplrWindow(), ); - newAccount && - (await playwright.waitAndClickByText( - onboardingElements.useRecoveryPhraseButton, - await playwright.keplrWindow(), - )); - if (secretWordsOrPrivateKey.includes(' ')) { await module.exports.importWalletWithPhrase( secretWordsOrPrivateKey, @@ -377,7 +366,6 @@ const keplr = { { secretWordsOrPrivateKey, password, - newAccount, walletName, selectedChains, createNewWallet, @@ -398,7 +386,6 @@ const keplr = { await module.exports.importWallet( secretWordsOrPrivateKey, password, - newAccount, walletName, selectedChains, ); diff --git a/pages/keplr/first-time-flow-page.js b/pages/keplr/first-time-flow-page.js index 891ffd658..15ad15146 100644 --- a/pages/keplr/first-time-flow-page.js +++ b/pages/keplr/first-time-flow-page.js @@ -1,6 +1,5 @@ const createWalletButton = 'Create a new wallet'; const existingWalletButton = 'Import an existing wallet'; -const importRecoveryPhraseButton = 'Import existing recovery phrase'; const createNewRecoveryPhraseButton = 'Create new recovery phrase'; const showMyPhraseButton = 'I understood. Show my phrase.'; const copyToClipboardButton = 'Copy to clipboard'; @@ -24,7 +23,6 @@ const importButtonSelector = 'button:has-text("Import")'; module.exports.onboardingElements = { existingWalletButton, createWalletButton, - importRecoveryPhraseButton, createNewRecoveryPhraseButton, showMyPhraseButton, copyToClipboardButton, diff --git a/plugins/keplr-plugin.js b/plugins/keplr-plugin.js index db22dc345..dff8824cc 100644 --- a/plugins/keplr-plugin.js +++ b/plugins/keplr-plugin.js @@ -97,7 +97,6 @@ module.exports = (on, config) => { setupWallet: async ({ secretWordsOrPrivateKey, password, - newAccount, walletName, selectedChains, createNewWallet, @@ -105,7 +104,6 @@ module.exports = (on, config) => { await keplr.initialSetup(null, { secretWordsOrPrivateKey, password, - newAccount, walletName, selectedChains, createNewWallet, diff --git a/support/commands.js b/support/commands.js index 082e01a2a..32d9318d3 100644 --- a/support/commands.js +++ b/support/commands.js @@ -415,7 +415,6 @@ Cypress.Commands.add('setupWallet', (args = {}) => { secretWords, privateKey, password = 'Test1234', - newAccount = false, walletName = 'My Wallet', selectedChains = [], createNewWallet = false, @@ -426,7 +425,6 @@ Cypress.Commands.add('setupWallet', (args = {}) => { privateKey || 'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology', password, - newAccount, walletName, selectedChains, createNewWallet, diff --git a/support/index.d.ts b/support/index.d.ts index 0c355b23e..fceb717d5 100644 --- a/support/index.d.ts +++ b/support/index.d.ts @@ -518,7 +518,6 @@ declare namespace Cypress { secretWords?: string; privateKey?: string; password?: string; - newAccount?: boolean; walletName?: string; selectedChains?: Array; createNewWallet?: boolean; diff --git a/tests/e2e/specs/keplr/keplr-spec.js b/tests/e2e/specs/keplr/keplr-spec.js index 8960841d9..c718848a5 100644 --- a/tests/e2e/specs/keplr/keplr-spec.js +++ b/tests/e2e/specs/keplr/keplr-spec.js @@ -86,12 +86,11 @@ describe('Keplr', () => { 'Offer accepted', ); }); - it(`should create a new wallet using 24 word phrase`, () => { + it(`should import a wallet and add selected chains`, () => { cy.setupWallet({ secretWords: 'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology', password: 'Test1234', - newAccount: true, walletName: 'My Wallet 2', selectedChains: ['Agoric localhost', 'Secret Network'], }).then(setupFinished => {