test(range): fix flaky start/end event test (#25153)

This commit is contained in:
Amanda Johnston
2022-04-20 09:41:42 -05:00
committed by GitHub
parent 9121781ed5
commit c27d307beb

View File

@ -29,6 +29,7 @@ test('range: start/end events', async () => {
const rangeEl = await page.$('#basic');
await dragElementBy(rangeEl, page, 300, 0);
await page.waitForChanges();
/**
* dragElementBy defaults to starting the drag from the middle of the el,
@ -41,6 +42,7 @@ test('range: start/end events', async () => {
* Verify both events fire if range is clicked without dragging.
*/
await dragElementBy(rangeEl, page, 0, 0);
await page.waitForChanges();
expect(rangeStart).toHaveReceivedEventDetail({ value: 50 });
expect(rangeEnd).toHaveReceivedEventDetail({ value: 50 });