test: page.reload() works with cross-origin redirect (#16655)
This commit is contained in:
parent
5dc43d4957
commit
52eca0550d
|
|
@ -146,6 +146,23 @@ it('page.reload should not resolve with same-document navigation', async ({ page
|
||||||
expect(await gotResponse.text()).toBe('hello');
|
expect(await gotResponse.text()).toBe('hello');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('page.reload should work with same origin redirect', async ({ page, server }) => {
|
||||||
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/16147' });
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
server.setRedirect('/empty.html', server.PREFIX + '/title.html');
|
||||||
|
await page.reload();
|
||||||
|
await expect(page).toHaveURL(server.PREFIX + '/title.html');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('page.reload should work with cross-origin redirect', async ({ page, server, browserName }) => {
|
||||||
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/16147' });
|
||||||
|
it.fixme(browserName === 'webkit');
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
server.setRedirect('/empty.html', server.CROSS_PROCESS_PREFIX + '/title.html');
|
||||||
|
await page.reload();
|
||||||
|
await expect(page).toHaveURL(server.CROSS_PROCESS_PREFIX + '/title.html');
|
||||||
|
});
|
||||||
|
|
||||||
it('page.goBack during renderer-initiated navigation', async ({ page, server }) => {
|
it('page.goBack during renderer-initiated navigation', async ({ page, server }) => {
|
||||||
await page.goto(server.PREFIX + '/one-style.html');
|
await page.goto(server.PREFIX + '/one-style.html');
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue