Skip to content

Commit

Permalink
fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 committed Jun 21, 2022
1 parent 5f407b6 commit 5483e03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion test/e2e/tests/add-hide-token.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ describe('Add existing token using search', function () {
fixtures: 'imported-account',
ganacheOptions,
title: this.test.title,
driverOptions: {
timeOut: 20000,
},
},
async ({ driver }) => {
await driver.navigate();
Expand All @@ -81,7 +84,7 @@ describe('Add existing token using search', function () {
await driver.clickElement({ text: 'import tokens', tag: 'a' });
await driver.fill('#search-tokens', 'BAT');
await driver.clickElement({
text: 'Basic Attention Token (BAT)',
text: 'BAT',
tag: 'span',
});
await driver.clickElement({ text: 'Next', tag: 'button' });
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/tests/swap-eth.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ describe('Swap Eth for another Token', function () {
ganacheOptions,
title: this.test.title,
failOnConsoleError: false,
driverOptions: {
timeOut: 20000,
},
},
async ({ driver }) => {
await driver.navigate();
Expand All @@ -37,7 +40,6 @@ describe('Swap Eth for another Token', function () {
'[class="dropdown-search-list__closed-primary-label dropdown-search-list__select-default"]',
);
await driver.clickElement('[placeholder="Search for a token"]');
await driver.clickElement('[placeholder="Search for a token"]');
await driver.fill('[placeholder="Search for a token"]', 'DAI');
await driver.waitForSelector(
'[class="searchable-item-list__primary-label"]',
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/webdriver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const Driver = require('./driver');
const ChromeDriver = require('./chrome');
const FirefoxDriver = require('./firefox');

async function buildWebDriver({ responsive, port, type } = {}) {
async function buildWebDriver({ responsive, port, type, timeOut } = {}) {
const browser = process.env.SELENIUM_BROWSER;

const {
driver: seleniumDriver,
extensionId,
extensionUrl,
} = await buildBrowserWebDriver(browser, { responsive, port, type });
const driver = new Driver(seleniumDriver, browser, extensionUrl);
const driver = new Driver(seleniumDriver, browser, extensionUrl, timeOut);

return {
driver,
Expand Down

0 comments on commit 5483e03

Please sign in to comment.