mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-24 08:08:18 -05:00
test: change page load strategy to improve integration tests
This commit is contained in:
parent
edd0bef52f
commit
374f75bdee
2 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,8 @@ const SeleniumHelper = require('./selenium-helpers.js');
|
|||
|
||||
const {
|
||||
clickText,
|
||||
buildDriver
|
||||
buildDriver,
|
||||
findText
|
||||
} = new SeleniumHelper();
|
||||
|
||||
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
|
||||
|
@ -20,6 +21,7 @@ describe('www-integration footer links', () => {
|
|||
|
||||
beforeEach(async () => {
|
||||
await driver.get(rootUrl);
|
||||
await findText('Create stories, games, and animations');
|
||||
});
|
||||
|
||||
afterAll(async () => await driver.quit());
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const webdriver = require('selenium-webdriver');
|
||||
const {PageLoadStrategy} = require('selenium-webdriver/lib/capabilities');
|
||||
const bindAll = require('lodash.bindall');
|
||||
require('chromedriver');
|
||||
const chromedriverVersion = require('chromedriver').version;
|
||||
|
@ -60,6 +61,7 @@ class SeleniumHelper {
|
|||
args.push('--no-sandbox');
|
||||
}
|
||||
chromeCapabilities.set('chromeOptions', {args});
|
||||
chromeCapabilities.setPageLoadStrategy(PageLoadStrategy.EAGER);
|
||||
let driver = new webdriver.Builder()
|
||||
.forBrowser('chrome')
|
||||
.withCapabilities(chromeCapabilities)
|
||||
|
|
Loading…
Reference in a new issue