From 9f2d074f9ef502d4dd7ec70847a3bfa403044a9c Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 1 Oct 2018 12:24:30 -0230 Subject: Update e2e tests for adding mutliple custom RPC endpoints Refs 56965b3 Refs #5267 The list of custom RPC endpoints is no longer limited to 3 entries so the test is now to confirm that they _all_ show up. --- test/e2e/beta/metamask-beta-ui.spec.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index b8381cdee..ecad3e8fd 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -1059,25 +1059,15 @@ describe('MetaMask', function () { await delay(largeDelayMs * 2) }) - it('finds 3 recent RPCs in history', async () => { + it('finds all recent RPCs in history', async () => { const networkDropdown = await findElement(driver, By.css('.network-name')) await networkDropdown.click() await delay(regularDelayMs) - // oldest selected RPC is not found - await assertElementNotPresent(webdriver, driver, By.xpath(`//span[contains(text(), '${customRpcUrls[0]}')]`)) - // only recent 3 are found and in correct order (most recent at the top) const customRpcs = await findElements(driver, By.xpath(`//span[contains(text(), 'https://mainnet.infura.io/')]`)) - assert.equal(customRpcs.length, 3) - - for (let i = 0; i < customRpcs.length; i++) { - const linkText = await customRpcs[i].getText() - const rpcUrl = customRpcUrls[customRpcUrls.length - i - 1] - - assert.notEqual(linkText.indexOf(rpcUrl), -1) - } + assert.equal(customRpcs.length, customRpcUrls.length) }) }) }) -- cgit v1.2.3