1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

test - e2e - set network to localhost

This commit is contained in:
kumavis 2018-03-30 13:52:42 -07:00
parent a9391ea2ef
commit 32bb09bcb9

View File

@ -38,6 +38,8 @@ describe('Metamask popup page', function () {
const tabs = await driver.getAllWindowHandles() const tabs = await driver.getAllWindowHandles()
await driver.switchTo().window(tabs[0]) await driver.switchTo().window(tabs[0])
await delay(300) await delay(300)
await setProviderType('localhost')
await delay(300)
}) })
it('should match title', async () => { it('should match title', async () => {
@ -124,6 +126,10 @@ describe('Metamask popup page', function () {
}) })
}) })
async function setProviderType(type) {
await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
}
async function verboseReportOnFailure(test) { async function verboseReportOnFailure(test) {
const artifactDir = `./test-artifacts/${test.title}` const artifactDir = `./test-artifacts/${test.title}`
const filepathBase = `${artifactDir}/test-failure` const filepathBase = `${artifactDir}/test-failure`