test: unflake 'should return url with basic auth info' test (#23798)

On android there is no localhost. We should never use just localhost.
This commit is contained in:
Max Schmitt 2023-06-20 11:06:30 +02:00 committed by GitHub
parent 7a060d13f0
commit 5927b5e92b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -800,9 +800,9 @@ it('should wait for load when iframe attaches and detaches', async ({ page, serv
expect(await page.$('iframe')).toBe(null);
});
it('should return url with basic auth info', async ({ page, server }) => {
it('should return url with basic auth info', async ({ page, server, loopback }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23138' });
const url = `http://admin:admin@localhost:${server.PORT}/empty.html`;
const url = `http://admin:admin@${loopback || 'localhost'}:${server.PORT}/empty.html`;
await page.goto(url);
expect(await page.url()).toBe(url);
expect(page.url()).toBe(url);
});