|
|
@ -94,11 +94,9 @@ describe('Using MetaMask with an existing account', function () { |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
|
// Close all other tabs
|
|
|
|
// Close all other tabs
|
|
|
|
const [oldUi, infoPage, newUi] = await driver.getAllWindowHandles() |
|
|
|
const [oldUi, newUi] = await driver.getAllWindowHandles() |
|
|
|
await driver.switchTo().window(oldUi) |
|
|
|
await driver.switchTo().window(oldUi) |
|
|
|
await driver.close() |
|
|
|
await driver.close() |
|
|
|
await driver.switchTo().window(infoPage) |
|
|
|
|
|
|
|
await driver.close() |
|
|
|
|
|
|
|
await driver.switchTo().window(newUi) |
|
|
|
await driver.switchTo().window(newUi) |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
@ -306,11 +304,11 @@ describe('Using MetaMask with an existing account', function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('picks an existing token', async () => { |
|
|
|
it('picks an existing token', async () => { |
|
|
|
const [tokenSearch] = await driver.findElements(By.css('input.add-token__input')) |
|
|
|
const [tokenSearch] = await driver.findElements(By.css('#search-tokens')) |
|
|
|
await tokenSearch.sendKeys('BAT') |
|
|
|
await tokenSearch.sendKeys('BAT') |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
|
const [token] = await driver.findElements(By.xpath("//div[contains(text(), 'BAT')]")) |
|
|
|
const [token] = await driver.findElements(By.xpath("//span[contains(text(), 'BAT')]")) |
|
|
|
await token.click() |
|
|
|
await token.click() |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
@ -343,7 +341,7 @@ describe('Using MetaMask with an existing account', function () { |
|
|
|
tokenName, |
|
|
|
tokenName, |
|
|
|
tokenDecimal, |
|
|
|
tokenDecimal, |
|
|
|
tokenSymbol, |
|
|
|
tokenSymbol, |
|
|
|
] = await driver.findElements(By.css('input')) |
|
|
|
] = await driver.findElements(By.css('.form-control')) |
|
|
|
|
|
|
|
|
|
|
|
await totalSupply.sendKeys('100') |
|
|
|
await totalSupply.sendKeys('100') |
|
|
|
await tokenName.sendKeys('Test') |
|
|
|
await tokenName.sendKeys('Test') |
|
|
@ -383,7 +381,7 @@ describe('Using MetaMask with an existing account', function () { |
|
|
|
await addCustomToken.click() |
|
|
|
await addCustomToken.click() |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
|
const [newTokenAddress] = await driver.findElements(By.css('.add-token__add-custom-form input')) |
|
|
|
const [newTokenAddress] = await driver.findElements(By.css('#custom-address')) |
|
|
|
await newTokenAddress.sendKeys(tokenAddress) |
|
|
|
await newTokenAddress.sendKeys(tokenAddress) |
|
|
|
await delay(regularDelayMs) |
|
|
|
await delay(regularDelayMs) |
|
|
|
|
|
|
|
|
|
|
|