Improve stability of the resources e2e tests#6972
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
I think I tackled the root cause of the problems now so hopefully this should do it, decided to remove the query stuff after all |
|
All right, was another issue but think I am in the right direction still |
| cy.get('[data-action="per-page-250"]').click(); | ||
| cy.wait("@resourcesQuery"); | ||
| // keepPreviousData keeps the old page on screen while the new request is in flight, | ||
| // so retry until the header reads "1 - N of N": all resources rendered on one page. |
There was a problem hiding this comment.
I'm not entirly sure I understand how this is more robust than finding the text to be 1 - 250 🤔
The 20s timeout would retry the assertion regardless of the added logic to extract the total and recreate the 1 - 250 textContent
There was a problem hiding this comment.
Because the default is 100 and we know that before the deletion there were more than 100 resources, for example:
1 - 100 of 102 becomes => 1 - 76 of 76 (or something like this).
Then we know oke the deletion has happened and completed properly before we establish another rowCount and move on to the other assertions.
There was a problem hiding this comment.
Yes, the default is 100, but we just clicked on setting it to 250, no?
So your check will always pass, no matter how many are removed?
There was a problem hiding this comment.
Hmm yes I think that's a mistake I should move the 250 per page down and then the check should be useful to see whether or not those resources are deleted properly.
But I guess I can just delete it as well since we only have less than 100 resources left at that point (old leftover then)
Description
Fixes the flaky e2e tests for the resources view.
Ran these multiple times, should be more reliable now.
EDIT: Passed on the first time so it seems to work properly, we will see I guess...