Skip to content

Commit

Permalink
test: add goto after click test (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Apr 28, 2020
1 parent 031587a commit d8cccbd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/autowaiting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit d8cccbd

Please sign in to comment.