test: unflake click-timeout-4 (#4012)

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.
This commit is contained in:
Dmitry Gozman 2020-09-30 04:42:08 -07:00 committed by GitHub
parent ccc827cd87
commit ab2714ed29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');
});