From b4bc033b729f5e5991caeb933896c996f57b41dc Mon Sep 17 00:00:00 2001 From: George Marshall Date: Wed, 19 Jul 2023 10:12:24 -0700 Subject: [PATCH] Updating network list item hover (#20063) * Updating network list item hover * Updating e2e test * Updating e2e test * Updating e2e test * Updating more e2e tests * Updating more e2e tests --- test/e2e/tests/add-custom-network.spec.js | 2 +- test/e2e/tests/chain-interactions.spec.js | 2 +- test/e2e/tests/custom-rpc-history.spec.js | 4 ++-- test/e2e/tests/import-flow.spec.js | 2 +- test/e2e/tests/provider-api.spec.js | 2 +- .../__snapshots__/network-list-item.test.js.snap | 8 ++------ .../network-list-item/network-list-item.js | 12 +++++++----- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/test/e2e/tests/add-custom-network.spec.js b/test/e2e/tests/add-custom-network.spec.js index efea4d1d2..d094324ea 100644 --- a/test/e2e/tests/add-custom-network.spec.js +++ b/test/e2e/tests/add-custom-network.spec.js @@ -363,7 +363,7 @@ describe('Custom network', function () { const arbitrumNetwork = await driver.findElements({ text: 'Arbitrum One', - tag: 'span', + tag: 'button', }); assert.ok(arbitrumNetwork.length, 1); }, diff --git a/test/e2e/tests/chain-interactions.spec.js b/test/e2e/tests/chain-interactions.spec.js index 3135ab168..efb83f35e 100644 --- a/test/e2e/tests/chain-interactions.spec.js +++ b/test/e2e/tests/chain-interactions.spec.js @@ -63,7 +63,7 @@ describe('Chain Interactions', function () { await driver.clickElement('[data-testid="network-display"]'); const ganacheChain = await driver.findElements({ text: `Localhost ${port}`, - tag: 'span', + tag: 'button', }); assert.ok(ganacheChain.length, 1); }, diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index fd8e8314b..46bde39df 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -185,7 +185,7 @@ describe('Stores custom RPC history', function () { await driver.waitForElementNotPresent('.loading-overlay'); await driver.clickElement('[data-testid="network-display"]'); - await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); + await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'button' }); }, ); }); @@ -237,7 +237,7 @@ describe('Stores custom RPC history', function () { }); // click Mainnet to dismiss network dropdown - await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); + await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'button' }); assert.equal(customRpcs.length, 2); }, diff --git a/test/e2e/tests/import-flow.spec.js b/test/e2e/tests/import-flow.spec.js index dca9e2f72..3991350a6 100644 --- a/test/e2e/tests/import-flow.spec.js +++ b/test/e2e/tests/import-flow.spec.js @@ -79,7 +79,7 @@ describe('Import flow', function () { await driver.delay(largeDelayMs); await driver.clickElement('[data-testid="network-display"]'); await driver.clickElement('.toggle-button'); - await driver.clickElement({ text: 'Localhost', tag: 'span' }); + await driver.clickElement({ text: 'Localhost', tag: 'button' }); // choose Create account from the account menu await driver.clickElement('[data-testid="account-menu-icon"]'); diff --git a/test/e2e/tests/provider-api.spec.js b/test/e2e/tests/provider-api.spec.js index b8c0e0edc..79ac8f9fe 100644 --- a/test/e2e/tests/provider-api.spec.js +++ b/test/e2e/tests/provider-api.spec.js @@ -47,7 +47,7 @@ describe('MetaMask', function () { await driver.switchToWindow(windowHandles[0]); await driver.clickElement('[data-testid="network-display"]'); - await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); + await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'button' }); await driver.switchToWindowWithTitle('E2E Test Dapp', windowHandles); const switchedNetworkDiv = await driver.waitForSelector({ diff --git a/ui/components/multichain/network-list-item/__snapshots__/network-list-item.test.js.snap b/ui/components/multichain/network-list-item/__snapshots__/network-list-item.test.js.snap index dea38ffb6..a32760c67 100644 --- a/ui/components/multichain/network-list-item/__snapshots__/network-list-item.test.js.snap +++ b/ui/components/multichain/network-list-item/__snapshots__/network-list-item.test.js.snap @@ -18,13 +18,9 @@ exports[`NetworkListItem renders properly 1`] = ` class="mm-box multichain-network-list-item__network-name" >