You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>>>>> cd5d1a2 (Enhance Storybook testing rules and examples)
967
959
3. ✅ Follows click-before-clear pattern for inputs
968
960
4. ✅ Uses findBy* for async assertions
969
961
5. ✅ Tests both client-side and server-side validation
970
962
6. ✅ Includes proper error handling and success scenarios
971
-
<<<<<<< HEAD
972
-
7. ✅ Uses step function for complex workflows
973
-
8. ✅ Story serves as both documentation and test
974
-
9. ✅ Component is properly isolated and focused
975
-
10. ✅ Tests complete in reasonable time (< 10 seconds)
976
-
11. ✅ Uses React Router stub decorator for form handling
977
-
12. ✅ Includes accessibility considerations in queries
978
-
=======
979
963
7. ✅ Story serves as both documentation and test
980
964
8. ✅ Component is properly isolated and focused
981
965
9. ✅ Tests complete in reasonable time (< 10 seconds)
982
966
10. ✅ Uses semantic queries for better maintainability
983
967
11. ✅ Decorators are placed on individual stories for granular control
984
968
12. ✅ Meta configuration is kept clean and minimal
985
-
>>>>>>> cd5d1a2 (Enhance Storybook testing rules and examples)
986
969
987
970
## Team Workflow Integration
988
971
989
972
### Code Review Guidelines
990
973
- Verify interaction tests cover happy path and error scenarios
991
974
- Ensure stories are self-documenting and demonstrate component usage
992
-
<<<<<<< HEAD
993
-
- Check that tests follow semantic query patterns
994
-
- Validate that play functions are well-organized with step grouping
995
-
- Confirm tests don't introduce flaky behavior
996
-
=======
997
975
- Check that tests follow established patterns and conventions
998
976
- Validate that new tests don't introduce flaky behavior
999
977
- **Verify decorators are on individual stories, not in meta**
1000
978
- Ensure each story has appropriate isolation and dependencies
1001
-
>>>>>>> cd5d1a2 (Enhance Storybook testing rules and examples)
1002
979
1003
980
### Local Development Focus
1004
981
- Use Storybook UI for interactive development and debugging
@@ -1008,8 +985,4 @@ When creating or modifying Storybook interaction tests, ensure:
1008
985
- Fast feedback loop optimized for developer productivity
1009
986
- Individual story decorators provide flexibility for different testing scenarios
1010
987
1011
-
<<<<<<< HEAD
1012
-
Remember: Every story with a play function is both a test and living documentation. Focus on user behavior and accessibility. Use the step function to organize complex interactions. The Interactions panel in Storybook UI is your primary debugging tool for interaction tests.
1013
-
=======
1014
988
Remember: Every story should test real user workflows and serve as living documentation. Focus on behavior, not implementation details. The testing infrastructure should be reliable, fast, and easy to maintain for local development and Codegen workflows. **Always place decorators on individual stories for maximum flexibility and clarity.**
1015
-
>>>>>>> cd5d1a2 (Enhance Storybook testing rules and examples)
0 commit comments