test: add goto after click test (#1999)

This commit is contained in:
Pavel Feldman 2020-04-27 17:16:32 -07:00 committed by GitHub
parent 031587a9cf
commit d8cccbdb67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(`
<form action="${server.PREFIX}/login.html" method="get">
<input type="text">
<input type="submit" value="Submit">
</form>`);
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', () => {