From 5927b5e92b6665673b33b2604f1a0304d97d3ca3 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 20 Jun 2023 11:06:30 +0200 Subject: [PATCH] test: unflake 'should return url with basic auth info' test (#23798) On android there is no localhost. We should never use just localhost. --- tests/page/page-goto.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.ts index 19c7d1a05c..724f2db532 100644 --- a/tests/page/page-goto.spec.ts +++ b/tests/page/page-goto.spec.ts @@ -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); });