From d8cccbdb673eec21f4730649609b02bfa85148b0 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Mon, 27 Apr 2020 17:16:32 -0700 Subject: [PATCH] test: add goto after click test (#1999) --- test/autowaiting.spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/autowaiting.spec.js b/test/autowaiting.spec.js index 5978a998ed02c..6bc0ba6182f1a 100644 --- a/test/autowaiting.spec.js +++ b/test/autowaiting.spec.js @@ -199,6 +199,23 @@ describe('Auto waiting', () => { ]); expect(messages.join('|')).toBe('route|domcontentloaded|clickload'); }); + it('should work with goto following click', async({page, server}) => { + server.setRoute('/login.html', async (req, res) => { + messages.push('route'); + res.setHeader('Content-Type', 'text/html'); + res.end(`You are logged in`); + }); + + await page.setContent(` +
+ + +
`); + + await page.fill('input[type=text]', 'admin'); + await page.click('input[type=submit]'); + await page.goto(server.EMPTY_PAGE); + }); }); describe('Auto waiting should not hang when', () => {