Skip to content
Snippets Groups Projects
Unverified Commit 6296d32f authored by Filip Hric's avatar Filip Hric Committed by GitHub
Browse files

Fix flaky E2E #25322 reproduction (#37041)

Add delay instead of throttle.

Fixing a flake analyzed in this document.
https://replayio.notion.site/dashboard-filters-reproductions-25322-loading-list-19324262f19d404ba03787c9f70968ab

The test `25322-loading-list-values.cy.spec.js` has become flaky because the period of time to find loading-spinner element is too short. This is thanks to API response being fast.

in the past, this was partially remedied by adding `setThrottle()` method to slow the API response down. while it is a good initial approach, it is not resilient to a situation when the data transfer size becomes smaller.

I’m suggesting changing the method to setTimeout that will give the test enough time to catch the loading state.

In the future, this particular test would be a good candidate for a component test as it is quite granular.
parent 570cda6a
Branches
Tags
No related merge requests found
......@@ -75,5 +75,5 @@ const throttleFieldValuesRequest = dashboard_id => {
middleware: true,
};
cy.intercept(matcher, req => req.on("response", res => res.setThrottle(10)));
cy.intercept(matcher, req => req.on("response", res => res.setDelay(100)));
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment