-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
sorting by kind and nested stories #3963
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3963 +/- ##
==========================================
- Coverage 39.66% 39.63% -0.03%
==========================================
Files 433 431 -2
Lines 5445 5444 -1
Branches 740 740
==========================================
- Hits 2160 2158 -2
Misses 2903 2903
- Partials 382 383 +1
Continue to review full report at Codecov.
|
We should add some tests for this function |
@ndelangen I'm getting this error: any idea? I would create tests glady if can get this working :D |
@dioxmio There's lots of information in https://github.com/storybooks/storybook/blob/master/CONTRIBUTING.md In short: you need to run |
@ndelangen awesome thanks. I have added the test however the build on Danger is failing. Looks like labels are missing but I'm not able to add any. Could you add that? cheers |
@@ -74,6 +74,20 @@ describe('manager.ui.libs.filters', () => { | |||
expect(res).toEqual([stories[1], stories[2], stories[0]]); | |||
}); | |||
|
|||
test('should sort nested stories by kind', () => { |
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.
The name of a test is a bit misleading, it should be something like "should sort nested stories", because terminologically it's not "by kind".
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.
✅
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 you changed a wrong test 🤣
to reflect better what it's testing
Sorry @igor-dv that should do it 😄 |
Issue:
What I did
sorting nested stories when activating:
sortStoriesByKind: false
How to test
make sure that now both the root list of stories and the nested ones are ordered. At the moment just the root stories where sorted.
["bug", "maintenance"]
#3963