Skip to content

Commit

Permalink
test: unflake click-timeout-4 (#4012)
Browse files Browse the repository at this point in the history
We used to animate for 5 seconds, and also timeout after 5 seconds.
Presumably, this made the click work sometimes due to different timeout
schedulers in node vs browser.
  • Loading branch information
dgozman authored Sep 30, 2020
1 parent ccc827c commit ab2714e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/click-timeout-4.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ it('should timeout waiting for stable position', async ({page, server}) => {
button.style.transition = 'margin 5s linear 0s';
button.style.marginLeft = '200px';
});
const error = await button.click({ timeout: 5000 }).catch(e => e);
expect(error.message).toContain('elementHandle.click: Timeout 5000ms exceeded.');
const error = await button.click({ timeout: 3000 }).catch(e => e);
expect(error.message).toContain('elementHandle.click: Timeout 3000ms exceeded.');
expect(error.message).toContain('waiting for element to be visible, enabled and not moving');
expect(error.message).toContain('element is moving - waiting');
});

0 comments on commit ab2714e

Please sign in to comment.