This commit is contained in:
dennistikhomirov 2018-09-14 09:41:16 -07:00
parent b183835cc4
commit 9927d20302
2 changed files with 10 additions and 10 deletions

View File

@ -56,17 +56,17 @@ module.exports = {
addToken: {
title: By.className('page-subtitle'),
titleText: 'Add Token',
tab:{
custom:By.className('inactiveForm pointer'),
search:By.className('inactiveForm pointer')
tab: {
custom: By.className('inactiveForm pointer'),
search: By.className('inactiveForm pointer'),
},
search: {
fieldSearch: By.id('search-tokens'),
results: By.className('token-list__token-data'),
buttons: {
next: By.css('#app-content > div > div.app-primary.from-right > div > div:nth-child(3) > div.page-container__footer > div > button:nth-child(2)'),
cancel: By.className('btn-violet')
}
cancel: By.className('btn-violet'),
},
},
custom:
{
@ -77,7 +77,7 @@ module.exports = {
},
buttons: {
add: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(7) > button:nth-child(2)'),
cancel: By.className('btn-violet')
cancel: By.className('btn-violet'),
},
},

View File

@ -50,7 +50,7 @@ describe('Metamask popup page', async function () {
})
after(async function () {
//await driver.quit()
await driver.quit()
})
describe('Setup', async function () {
@ -1083,7 +1083,7 @@ describe('Metamask popup page', async function () {
}
async function waitUntilShowUp (by, Twait) {
if (Twait === undefined) Twait = 20
if (Twait === undefined) Twait = 200
do {
await delay(100)
if (await isElementDisplayed(by)) return await driver.findElement(by)
@ -1121,12 +1121,12 @@ describe('Metamask popup page', async function () {
try {
const button = await waitUntilShowUp(screens.main.tokens.buttonAdd, 300)
await click(button)
//await delay(2000)
// await delay(2000)
do {
const tab = await waitUntilShowUp(screens.addToken.tab.custom)
await tab.click()
}
while( await waitUntilShowUp(screens.addToken.custom.fields.contractAddress) === false)
while (await waitUntilShowUp(screens.addToken.custom.fields.contractAddress) === false)
const field = await waitUntilShowUp(screens.addToken.custom.fields.contractAddress)
await clearField(field)
await field.sendKeys(tokenAddress)