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
This commit is contained in:
George Kalpakas 2019-01-03 13:14:51 +02:00 committed by Ben Lesh
parent b7d0ab7de3
commit 27431e0e1e
1 changed files with 4 additions and 2 deletions

View File

@ -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);
});
});