mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
5beab87bf6
commit
9f2d074f9e
@ -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)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user