From d8eb1e388c120a19aa79a41d800da15a1c8931e0 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Fri, 3 Dec 2021 09:14:25 -0500 Subject: [PATCH] Increase timouts for integration tests --- test/integration/comments.test.js | 8 +------- test/integration/footer-links.test.js | 7 +------ test/integration/homepage-rows.test.js | 7 +------ test/integration/join.test.js | 7 +------ test/integration/my-stuff.test.js | 7 +------ test/integration/navbar.test.js | 7 +------ test/integration/project-page.test.js | 7 +------ test/integration/search.test.js | 7 +------ test/integration/sign-in-and-out.test.js | 7 +------ test/integration/statistics.test.js | 7 +------ test/integration/studios-page.test.js | 7 +------ 11 files changed, 11 insertions(+), 67 deletions(-) diff --git a/test/integration/comments.test.js b/test/integration/comments.test.js index 3181a4960..30ff52270 100644 --- a/test/integration/comments.test.js +++ b/test/integration/comments.test.js @@ -15,8 +15,6 @@ const { let username1 = process.env.SMOKE_USERNAME + '4'; let username2 = process.env.SMOKE_USERNAME + '5'; let password = process.env.SMOKE_PASSWORD; - -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; // project for comments (owned by username2) @@ -43,11 +41,7 @@ let projectReply = projectComment + ' reply'; let profileReply = profileComment + ' reply'; let studioReply = studioComment + ' reply'; -if (remote) { - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/footer-links.test.js b/test/integration/footer-links.test.js index 4818e29ea..57a5d513e 100644 --- a/test/integration/footer-links.test.js +++ b/test/integration/footer-links.test.js @@ -7,14 +7,9 @@ const { buildDriver } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; -if (remote) { - jest.setTimeout(60000); -} else { - jest.setTimeout(10000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/homepage-rows.test.js b/test/integration/homepage-rows.test.js index 84bf8fc52..b9815d222 100644 --- a/test/integration/homepage-rows.test.js +++ b/test/integration/homepage-rows.test.js @@ -8,14 +8,9 @@ const { buildDriver } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; -if (remote) { - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/join.test.js b/test/integration/join.test.js index a08e6861d..333c521aa 100644 --- a/test/integration/join.test.js +++ b/test/integration/join.test.js @@ -8,15 +8,10 @@ const { buildDriver } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let takenUsername = process.env.SMOKE_USERNAME; -if (remote){ - jest.setTimeout(60000); -} else { - jest.setTimeout(10000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/my-stuff.test.js b/test/integration/my-stuff.test.js index b3e4775f9..69cfc21f7 100644 --- a/test/integration/my-stuff.test.js +++ b/test/integration/my-stuff.test.js @@ -12,17 +12,12 @@ const { let username = process.env.SMOKE_USERNAME + '1'; let password = process.env.SMOKE_PASSWORD; -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let myStuffURL = rootUrl + '/mystuff'; let rateLimitCheck = process.env.RATE_LIMIT_CHECK || rootUrl; -if (remote){ - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/navbar.test.js b/test/integration/navbar.test.js index 59446de52..558692130 100644 --- a/test/integration/navbar.test.js +++ b/test/integration/navbar.test.js @@ -8,14 +8,9 @@ const { buildDriver } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; -if (remote) { - jest.setTimeout(60000); -} else { - jest.setTimeout(10000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/project-page.test.js b/test/integration/project-page.test.js index 03ba37811..e2dcf428c 100644 --- a/test/integration/project-page.test.js +++ b/test/integration/project-page.test.js @@ -9,16 +9,11 @@ const { waitUntilVisible } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let projectId = process.env.TEST_PROJECT_ID || 1300006196; let projectUrl = rootUrl + '/projects/' + projectId; -if (remote){ - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/search.test.js b/test/integration/search.test.js index 7a87af721..b933f3ec4 100644 --- a/test/integration/search.test.js +++ b/test/integration/search.test.js @@ -9,14 +9,9 @@ const { getKey } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; -if (remote){ - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/sign-in-and-out.test.js b/test/integration/sign-in-and-out.test.js index 648be82ac..8caaef82f 100644 --- a/test/integration/sign-in-and-out.test.js +++ b/test/integration/sign-in-and-out.test.js @@ -15,16 +15,11 @@ 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 scratchr2url = rootUrl + '/users/' + username; let wwwURL = rootUrl; -if (remote){ - jest.setTimeout(60000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/statistics.test.js b/test/integration/statistics.test.js index 8d0981f90..1e551852f 100644 --- a/test/integration/statistics.test.js +++ b/test/integration/statistics.test.js @@ -9,15 +9,10 @@ const { findByXpath } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let statisticsPage = rootUrl + '/statistics'; -if (remote) { - jest.setTimeout(60000); -} else { - jest.setTimeout(10000); -} +jest.setTimeout(60000); let driver; diff --git a/test/integration/studios-page.test.js b/test/integration/studios-page.test.js index a477151a9..b85e14d06 100644 --- a/test/integration/studios-page.test.js +++ b/test/integration/studios-page.test.js @@ -10,7 +10,6 @@ const { signIn } = new SeleniumHelper(); -let remote = process.env.SMOKE_REMOTE || false; let rootUrl = process.env.ROOT_URL || 'https://scratch.ly'; let studioId = process.env.TEST_STUDIO_ID || 10004360; let studioUrl = rootUrl + '/studios/' + studioId; @@ -26,11 +25,7 @@ let password = process.env.SMOKE_PASSWORD; let promoteStudioURL; let curatorTab; -if (remote){ - jest.setTimeout(70000); -} else { - jest.setTimeout(20000); -} +jest.setTimeout(70000); let driver;