aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-10-11 02:52:26 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2018-11-06 07:07:09 +0800
commit226601a956594d00817cdb1fa5214242aae7936c (patch)
treeca3b8a64b685599ef8ef26d4bf3396170949d122 /test/e2e
parentbfcb73ad533b7c2acea012a586c2a391811faf03 (diff)
downloadtangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar.gz
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar.bz2
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar.lz
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar.xz
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.tar.zst
tangerine-wallet-browser-226601a956594d00817cdb1fa5214242aae7936c.zip
EIP-1102: add user privacy option
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js16
-rw-r--r--test/e2e/metamask.spec.js33
2 files changed, 20 insertions, 29 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 5acc00e25..3285939e7 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -284,6 +284,22 @@ describe('MetaMask', function () {
})
})
+ describe('Enable privacy mode', () => {
+ it('enables privacy mode', async () => {
+ const networkDropdown = await findElement(driver, By.css('.network-name'))
+ await networkDropdown.click()
+ await delay(regularDelayMs)
+
+ const customRpcButton = await findElement(driver, By.xpath(`//span[contains(text(), 'Custom RPC')]`))
+ await customRpcButton.click()
+ await delay(regularDelayMs)
+
+ const privacyToggle = await findElement(driver, By.css('.settings-page__content-row:nth-of-type(9) .settings-page__content-item-col > div'))
+ await privacyToggle.click()
+ await delay(largeDelayMs * 2)
+ })
+ })
+
describe('Log out an log back in', () => {
it('logs out of the account', async () => {
await driver.findElement(By.css('.account-menu__icon')).click()
diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js
index 4fee40af9..980113007 100644
--- a/test/e2e/metamask.spec.js
+++ b/test/e2e/metamask.spec.js
@@ -2,11 +2,6 @@ const path = require('path')
const assert = require('assert')
const { By, Key, until } = require('selenium-webdriver')
const { delay, createModifiedTestBuild, setupBrowserAndExtension, verboseReportOnFailure } = require('./func')
-const {
- closeAllWindowHandlesExcept,
- switchToWindowWithTitle,
- switchToWindowWithUrlThatMatches,
-} = require('./beta/helpers')
describe('Metamask popup page', function () {
const browser = process.env.SELENIUM_BROWSER
@@ -188,7 +183,6 @@ describe('Metamask popup page', function () {
})
it('restores from seed phrase', async function () {
- await delay(1000)
const restoreSeedLink = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-center.flex-grow > p'))
assert.equal(await restoreSeedLink.getText(), 'Restore from seed phrase')
await restoreSeedLink.click()
@@ -207,10 +201,10 @@ describe('Metamask popup page', function () {
})
it('balance renders', async function () {
- await delay(1000)
+ await delay(500)
const balance = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > div.ether-balance.ether-balance-amount > div > div > div:nth-child(1) > div:nth-child(1)'))
assert.equal(await balance.getText(), '100.000')
- await delay(1000)
+ await delay(200)
})
it('sends transaction', async function () {
@@ -248,31 +242,12 @@ describe('Metamask popup page', function () {
})
describe('Token Factory', function () {
- let windowHandles
- let extension
- let dapp
it('navigates to token factory', async function () {
- await driver.get('http://token-factory-1102.now.sh')
- await delay(7000)
- windowHandles = await driver.getAllWindowHandles()
-
- dapp = await switchToWindowWithTitle(driver, 'Token Factory', windowHandles)
- await delay(400)
- extension = await switchToWindowWithUrlThatMatches(driver, /notification.html/, windowHandles)
- await delay(400)
-
- await closeAllWindowHandlesExcept(driver, [extension, dapp])
- await switchToWindowWithUrlThatMatches(driver, /notification.html/, [extension, dapp])
- const approveButton = await driver.wait(until.elementLocated(By.xpath(`//button[contains(text(), 'APPROVE')]`)), 10000)
- await approveButton.click()
+ await driver.get('http://tokenfactory.surge.sh/')
})
it('navigates to create token contract link', async function () {
- await delay(400)
- await switchToWindowWithTitle(driver, 'Token Factory', windowHandles)
- await delay(400)
-
const createToken = await driver.findElement(By.css('#bs-example-navbar-collapse-1 > ul > li:nth-child(3) > a'))
await createToken.click()
})
@@ -374,4 +349,4 @@ describe('Metamask popup page', function () {
return matchedErrorObjects
}
-})
+}) \ No newline at end of file