Skip to content

Commit d8cccbd

Browse files
authored
test: add goto after click test (#1999)
1 parent 031587a commit d8cccbd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/autowaiting.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,23 @@ describe('Auto waiting', () => {
199199
]);
200200
expect(messages.join('|')).toBe('route|domcontentloaded|clickload');
201201
});
202+
it('should work with goto following click', async({page, server}) => {
203+
server.setRoute('/login.html', async (req, res) => {
204+
messages.push('route');
205+
res.setHeader('Content-Type', 'text/html');
206+
res.end(`You are logged in`);
207+
});
208+
209+
await page.setContent(`
210+
<form action="${server.PREFIX}/login.html" method="get">
211+
<input type="text">
212+
<input type="submit" value="Submit">
213+
</form>`);
214+
215+
await page.fill('input[type=text]', 'admin');
216+
await page.click('input[type=submit]');
217+
await page.goto(server.EMPTY_PAGE);
218+
});
202219
});
203220

204221
describe('Auto waiting should not hang when', () => {

0 commit comments

Comments
 (0)