mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-22 19:05:56 -04:00
set up jest integration tests to run with saucelabs
This commit is contained in:
parent
b2eabeddfc
commit
8213466c2c
2 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
"test:integration": "npm run test:integration:jest && npm run test:smoke",
|
||||
"test:integration:jest": "jest ./test/integration/*.test.js",
|
||||
"test:integration:remote": "npm run test:integration:jest && npm run test:smoke:sauce",
|
||||
"test:integration:jest:remote": "SMOKE_REMOTE=true jest ./test/integration/*.test.js",
|
||||
"test:smoke": "tap ./test/integration-legacy/smoke-testing/*.js --timeout=3600 --no-coverage -R classic",
|
||||
"test:smoke:verbose": "tap ./test/integration-legacy/smoke-testing/*.js --timeout=3600 --no-coverage -R spec",
|
||||
"test:smoke:sauce": "SMOKE_REMOTE=true tap ./test/integration-legacy/smoke-testing/*.js --timeout=60000 --no-coverage -R classic",
|
||||
|
|
|
@ -10,9 +10,14 @@ const {
|
|||
|
||||
let username = process.env.SMOKE_USERNAME;
|
||||
let password = process.env.SMOKE_PASSWORD;
|
||||
let remote = process.env.SMOKE_REMOTE || false;
|
||||
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
|
||||
let url = rootUrl + '/users/' + username;
|
||||
|
||||
if (remote){
|
||||
jest.setTimeout(60000);
|
||||
}
|
||||
|
||||
let driver;
|
||||
|
||||
describe('www-integration my-stuff', () => {
|
||||
|
@ -36,8 +41,9 @@ describe('www-integration my-stuff', () => {
|
|||
.then(() => findByXpath('//div[@class="title-banner intro-banner"]'));
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
// afterAll must be async in order to actually call driver.quit
|
||||
afterAll(async () => {
|
||||
await driver.quit();
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue