Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination test is flaky #279

Closed
jagthedrummer opened this issue May 4, 2023 · 2 comments
Closed

Pagination test is flaky #279

jagthedrummer opened this issue May 4, 2023 · 2 comments

Comments

@jagthedrummer
Copy link
Contributor

For some reason the pagination system test is failing for me in CI, but not locally.

This line is failing for me:

refute page.has_content?("Test #{Pagy::DEFAULT[:items] + 1}")

The page size is 20, so that line is looking for the string "Test 21" in the page content, and is finding it even though it should not be found.

After much head scratching and debugging I finally figured out that for some reason the sort order in CI is backwards. (I have no idea why that might be the case.)

So "Test 21" is actually on the page, but the first item "Test 1" is missing.

But there's actually a test to check for "Test 1" that is passing when it shouldn't pass. And that's because we're doing simple substring matching and "Test 1" also matches "Test 11", "Test 12", etc...

@jagthedrummer
Copy link
Contributor Author

Oops, should have opened this on the starter repo, not on core. Moving there.

@jagthedrummer
Copy link
Contributor Author

Closing in favor of: bullet-train-co/bullet_train#765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant