-
Notifications
You must be signed in to change notification settings - Fork 2
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
Query testsForStory
and testsForStatus
separately to avoid pagination
#37
Query testsForStory
and testsForStatus
separately to avoid pagination
#37
Conversation
AP-3492 `Project.tests` API returns only 100 results
But storybooks can have a lot more than 100 tests. We either need to up the limit or (likely better) paginate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this PR should be telescoping on #36 (review) -- a bit hard to review as a result.
But the code changes to VisualTests.tsx
look good. I'm a bit surprised there aren't more changes to the story data in VisualTests.stories.ts
though?
…ors' into ghengeveld/ap-3492-projecttests-api-returns-only-100-results
@tmeasday You're right I forgot to commit+push some changes. I updated the base to telescope off your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One question about testing strategy we should address.
Rather than fetching all data for all tests on the build, we only query for all data for the tests for the currently selected story, and additionally fetch limited data for up to 1000 (max page size) tests that are in progress, pending, denied, failed or broken. This way we avoid having to do any kind of pagination logic.
In the unusual case that >1000 tests have such a status this will break down, but this is acceptable because it's used only to display status dots in the Storybook sidebar.
Depends on https://github.com/chromaui/chromatic/pull/7628
📦 Published PR as canary version:
0.0.29--canary.37.4a8d155.0
✨ Test out this PR locally via: