Merge pull request #6364 from BryceLTaylor/remove-run-in-band

Remove run in band from integration tests
This commit is contained in:
Bryce Taylor 2021-12-03 10:02:56 -05:00 committed by GitHub
commit 79d0c8f7b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 13 additions and 69 deletions

View file

@ -7,8 +7,8 @@
"test": "npm run test:lint && npm run build && npm run test:unit", "test": "npm run test:lint && npm run build && npm run test:unit",
"test:lint": "eslint . --ext .js,.jsx,.json", "test:lint": "eslint . --ext .js,.jsx,.json",
"test:lint:ci": "eslint . --ext .js,.jsx,.json --format junit -o ./test/results/lint-results.xml", "test:lint:ci": "eslint . --ext .js,.jsx,.json --format junit -o ./test/results/lint-results.xml",
"test:integration": "jest ./test/integration/*.test.js --reporters=default --runInBand", "test:integration": "jest ./test/integration/*.test.js --reporters=default --maxWorkers=5",
"test:integration:remote": "SMOKE_REMOTE=true jest ./test/integration/*.test.js --reporters=default --runInBand", "test:integration:remote": "SMOKE_REMOTE=true jest ./test/integration/*.test.js --reporters=default --maxWorkers=5",
"test:unit": "npm run test:unit:jest && npm run test:unit:tap", "test:unit": "npm run test:unit:jest && npm run test:unit:tap",
"test:unit:jest": "npm run test:unit:jest:unit && npm run test:unit:jest:localization", "test:unit:jest": "npm run test:unit:jest:unit && npm run test:unit:jest:localization",
"test:unit:jest:unit": "jest ./test/unit/ --reporters=default", "test:unit:jest:unit": "jest ./test/unit/ --reporters=default",

View file

@ -15,8 +15,6 @@ const {
let username1 = process.env.SMOKE_USERNAME + '4'; let username1 = process.env.SMOKE_USERNAME + '4';
let username2 = process.env.SMOKE_USERNAME + '5'; let username2 = process.env.SMOKE_USERNAME + '5';
let password = process.env.SMOKE_PASSWORD; let password = process.env.SMOKE_PASSWORD;
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
// project for comments (owned by username2) // project for comments (owned by username2)
@ -43,11 +41,7 @@ let projectReply = projectComment + ' reply';
let profileReply = profileComment + ' reply'; let profileReply = profileComment + ' reply';
let studioReply = studioComment + ' reply'; let studioReply = studioComment + ' reply';
if (remote) {
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -7,14 +7,9 @@ const {
buildDriver buildDriver
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
if (remote) {
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(10000);
}
let driver; let driver;

View file

@ -8,14 +8,9 @@ const {
buildDriver buildDriver
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
if (remote) {
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -8,15 +8,10 @@ const {
buildDriver buildDriver
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let takenUsername = process.env.SMOKE_USERNAME; let takenUsername = process.env.SMOKE_USERNAME;
if (remote){
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(10000);
}
let driver; let driver;

View file

@ -12,17 +12,12 @@ const {
let username = process.env.SMOKE_USERNAME + '1'; let username = process.env.SMOKE_USERNAME + '1';
let password = process.env.SMOKE_PASSWORD; let password = process.env.SMOKE_PASSWORD;
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let myStuffURL = rootUrl + '/mystuff'; let myStuffURL = rootUrl + '/mystuff';
let rateLimitCheck = process.env.RATE_LIMIT_CHECK || rootUrl; let rateLimitCheck = process.env.RATE_LIMIT_CHECK || rootUrl;
if (remote){
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -8,14 +8,9 @@ const {
buildDriver buildDriver
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
if (remote) {
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(10000);
}
let driver; let driver;

View file

@ -9,16 +9,11 @@ const {
waitUntilVisible waitUntilVisible
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let projectId = process.env.TEST_PROJECT_ID || 1300006196; let projectId = process.env.TEST_PROJECT_ID || 1300006196;
let projectUrl = rootUrl + '/projects/' + projectId; let projectUrl = rootUrl + '/projects/' + projectId;
if (remote){
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -9,14 +9,9 @@ const {
getKey getKey
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
if (remote){
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -15,16 +15,11 @@ const {
let username = process.env.SMOKE_USERNAME; let username = process.env.SMOKE_USERNAME;
let password = process.env.SMOKE_PASSWORD; let password = process.env.SMOKE_PASSWORD;
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let scratchr2url = rootUrl + '/users/' + username; let scratchr2url = rootUrl + '/users/' + username;
let wwwURL = rootUrl; let wwwURL = rootUrl;
if (remote){
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;

View file

@ -9,15 +9,10 @@ const {
findByXpath findByXpath
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let statisticsPage = rootUrl + '/statistics'; let statisticsPage = rootUrl + '/statistics';
if (remote) {
jest.setTimeout(60000); jest.setTimeout(60000);
} else {
jest.setTimeout(10000);
}
let driver; let driver;

View file

@ -10,7 +10,6 @@ const {
signIn signIn
} = new SeleniumHelper(); } = new SeleniumHelper();
let remote = process.env.SMOKE_REMOTE || false;
let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
let studioId = process.env.TEST_STUDIO_ID || 10004360; let studioId = process.env.TEST_STUDIO_ID || 10004360;
let studioUrl = rootUrl + '/studios/' + studioId; let studioUrl = rootUrl + '/studios/' + studioId;
@ -26,11 +25,7 @@ let password = process.env.SMOKE_PASSWORD;
let promoteStudioURL; let promoteStudioURL;
let curatorTab; let curatorTab;
if (remote){
jest.setTimeout(70000); jest.setTimeout(70000);
} else {
jest.setTimeout(20000);
}
let driver; let driver;