Fix flaky admin customer return spec #5757
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This spec tests behavior from the backend gem, and it relies on the ordering of return items to be consistent. However, it appears to not be consistent, so sometimes this spec fails, because the receivable return item is in line 1 of the table, not in line 2.
I expect the new admin to get this functionality at some point in time, so I'm not bothering with fixing the order of return items, just making sure that the remaining item is received.
See https://output.circle-artifacts.com/output/job/886635ab-de5f-4926-8d31-b3a11e631479/artifacts/0/test-artifacts/screenshot_2024-05-17-13-05-16.279.html for an HTML screenshot of the failing spec.