From 27431e0e1e687a279e4dd31d95d401036f608d87 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 3 Jan 2019 13:14:51 +0200 Subject: [PATCH] test(docs-infra): increase timeout for redirection to external URL (#27903) Occasionally, external URLs take longer to load, which causes CI flakes. PR Close #27903 --- aio/tests/deployment/e2e/redirection.e2e-spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aio/tests/deployment/e2e/redirection.e2e-spec.ts b/aio/tests/deployment/e2e/redirection.e2e-spec.ts index d6229e0fd6..9133388049 100644 --- a/aio/tests/deployment/e2e/redirection.e2e-spec.ts +++ b/aio/tests/deployment/e2e/redirection.e2e-spec.ts @@ -27,14 +27,16 @@ describe(browser.baseUrl, () => { describe('(with legacy URLs)', () => { page.legacyUrls.forEach(([fromUrl, toUrl], i) => { + const isExternalUrl = /^https?:/.test(toUrl); + it(`should redirect '${fromUrl}' to '${toUrl}' (${i + 1}/${page.legacyUrls.length})`, async () => { await page.goTo(fromUrl); - const expectedUrl = stripTrailingSlash(/^http/.test(toUrl) ? toUrl : page.baseUrl + toUrl); + const expectedUrl = stripTrailingSlash(isExternalUrl ? toUrl : page.baseUrl + toUrl); const actualUrl = await getCurrentUrl(); expect(actualUrl).toBe(expectedUrl); - }); + }, isExternalUrl ? 60000 : undefined); }); });