test(docs-infra): make redirection tests more robust (#26649)
PR Close #26649
This commit is contained in:
parent
b7d7609872
commit
c277c198d2
@ -59,7 +59,9 @@ describe(browser.baseUrl, () => {
|
|||||||
it('should serve `index.html` for unknown pages', async () => {
|
it('should serve `index.html` for unknown pages', async () => {
|
||||||
const aioShell = element(by.css('aio-shell'));
|
const aioShell = element(by.css('aio-shell'));
|
||||||
const heading = aioShell.element(by.css('h1'));
|
const heading = aioShell.element(by.css('h1'));
|
||||||
|
|
||||||
await page.goTo(unknownPagePath);
|
await page.goTo(unknownPagePath);
|
||||||
|
await browser.wait(() => page.getDocViewerText(), 5000); // Wait for the document to be loaded.
|
||||||
|
|
||||||
expect(aioShell.isPresent()).toBe(true);
|
expect(aioShell.isPresent()).toBe(true);
|
||||||
expect(heading.getText()).toMatch(/page not found/i);
|
expect(heading.getText()).toMatch(/page not found/i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user