test(docs-infra): increase timeout for all redirection tests (#28103)
Occasionally, URLs take longer to load, which causes CI flakes. In #27903, the timeout for external URLs was increased, but internal URLs turned out to be affected as well. PR Close #28103
This commit is contained in:
parent
6fff74e576
commit
48a03fcc80
|
@ -27,16 +27,14 @@ describe(browser.baseUrl, () => {
|
||||||
|
|
||||||
describe('(with legacy URLs)', () => {
|
describe('(with legacy URLs)', () => {
|
||||||
page.legacyUrls.forEach(([fromUrl, toUrl], i) => {
|
page.legacyUrls.forEach(([fromUrl, toUrl], i) => {
|
||||||
const isExternalUrl = /^https?:/.test(toUrl);
|
|
||||||
|
|
||||||
it(`should redirect '${fromUrl}' to '${toUrl}' (${i + 1}/${page.legacyUrls.length})`, async () => {
|
it(`should redirect '${fromUrl}' to '${toUrl}' (${i + 1}/${page.legacyUrls.length})`, async () => {
|
||||||
await page.goTo(fromUrl);
|
await page.goTo(fromUrl);
|
||||||
|
|
||||||
const expectedUrl = stripTrailingSlash(isExternalUrl ? toUrl : page.baseUrl + toUrl);
|
const expectedUrl = stripTrailingSlash(/^https?:/.test(toUrl) ? toUrl : page.baseUrl + toUrl);
|
||||||
const actualUrl = await getCurrentUrl();
|
const actualUrl = await getCurrentUrl();
|
||||||
|
|
||||||
expect(actualUrl).toBe(expectedUrl);
|
expect(actualUrl).toBe(expectedUrl);
|
||||||
}, isExternalUrl ? 60000 : undefined);
|
}, 60000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue