-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore(cypress): extend test suite to cover case study elements in practice quizzes #4488
Conversation
📝 WalkthroughWalkthroughThis PR extends support for case study elements across the application by adding Changes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cypress/cypress/e2e/H-practice-quiz-workflow.cy.ts (1)
304-304
: Use a named constant for substring length.
While this is functional, consider extracting20
into a constant to clarify intent.- this.data.questions.CS.title.substring(0, 20) + this.data.questions.CS.title.substring(0, MAX_DISPLAY_LENGTH)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
apps/frontend-manage/src/components/activities/creation/groupActivity/GroupActivityWizard.tsx
(1 hunks)apps/frontend-manage/src/components/activities/creation/liveQuiz/LiveQuizQuestionsStep.tsx
(1 hunks)apps/frontend-manage/src/components/activities/creation/microLearning/MicroLearningWizard.tsx
(1 hunks)apps/frontend-manage/src/components/activities/creation/practiceQuiz/PracticeQuizWizard.tsx
(1 hunks)cypress/cypress/e2e/H-practice-quiz-workflow.cy.ts
(14 hunks)cypress/cypress/fixtures/H-practice-quiz.json
(1 hunks)cypress/cypress/support/commands.ts
(16 hunks)packages/shared-components/src/evaluation/CSEvaluation.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/shared-components/src/evaluation/CSEvaluation.tsx
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: format
- GitHub Check: SonarCloud
- GitHub Check: build
- GitHub Check: cypress-run
- GitHub Check: check
- GitHub Check: test
- GitHub Check: Analyze (javascript)
🔇 Additional comments (27)
cypress/cypress/e2e/H-practice-quiz-workflow.cy.ts (19)
76-78
: Ensure the answer collection creation references are correct.
Everything looks good here.
89-90
: Check collection usage for selection question.
The references to the collection name and filtered correct answers appear consistent.
94-107
: Case Study question creation.
The addition ofcy.createQuestionCS
correctly sets up the new case study question type.
188-188
: Include Case Study in quiz stack.
Adding the new question to the stack is properly handled.
307-308
: Consistent substring usage for Flashcard title.
No issues found with these lines.
320-323
: Validate drag-and-drop for SC1 question.
The logic to drag and drop elements into the correct stack looks correct.
491-491
: Check duplication of Case Study question.
Ensures the new Case Study type is included in duplication tests.
494-494
: Confirm Flashcard substring on duplication.
Looks consistent and well-integrated.
497-497
: Confirm Content substring on duplication.
No issues found here.
498-498
: Check closing parenthesis.
Syntax is correct.
499-499
: Continue duplication logic.
All good on this line.
523-535
: Review of computeCaseStudySlidedValue.
The logic for handling midpoints, steps, and clamping is correct.
636-639
: Check pointer-events for SE question fields.
Verifying the selected options become non-interactive after submission is valid.Also applies to: 642-642
646-709
: Implement Case Study question submission flow.
Thorough coverage of sliding controls and result verification. Nicely done.
712-712
: Practice quiz progress navigation.
Index-based navigation to previous questions works correctly.
844-844
: Partial submission of SE question.
This test properly checks partial submission features for selection questions.
854-916
: Partial answers for Case Study question.
Excellent approach verifying full coverage of partial slider interactions.
1216-1216
: Include Case Study question in cleanup list.
Good to see the question is removed as part of the final cleanup.
1230-1230
: Delete the created answer collection.
Logic fits the final cleanup phase.apps/frontend-manage/src/components/activities/creation/liveQuiz/LiveQuizQuestionsStep.tsx (1)
24-24
: AddElementType.CaseStudy
to accepted types.
This aligns with the new case study functionality across the app.apps/frontend-manage/src/components/activities/creation/practiceQuiz/PracticeQuizWizard.tsx (1)
54-54
: Expand accepted types withElementType.CaseStudy
.
Ensures the practice quiz wizard accommodates case study questions.apps/frontend-manage/src/components/activities/creation/microLearning/MicroLearningWizard.tsx (1)
53-53
: LGTM!The addition of
ElementType.CaseStudy
to theacceptedTypes
array is consistent with the PR objective to extend support for case study elements.apps/frontend-manage/src/components/activities/creation/groupActivity/GroupActivityWizard.tsx (1)
56-56
: LGTM!The addition of
ElementType.CaseStudy
to theacceptedTypes
array is consistent with the PR objective to extend support for case study elements.cypress/cypress/support/commands.ts (2)
207-207
: LGTM! Consistent addition of explanation parameter.The addition of the optional
explanation
parameter to question creation commands is well-implemented and follows a consistent pattern.Also applies to: 214-234
662-836
: LGTM! Well-structured case study command implementation.The new
createQuestionCS
command is well-implemented with:
- Clear interface definition
- Comprehensive validation steps
- Proper error handling
- Good verification of entered data
cypress/cypress/fixtures/H-practice-quiz.json (2)
63-73
: LGTM! Good restructuring of collection data.Moving the collection data to the root level improves reusability and reduces duplication.
80-241
: LGTM! Comprehensive case study test data.The new CS section provides:
- Well-structured test data
- Good coverage of all case study features
- Diverse test values for thorough testing
klicker-uzh Run #4218
Run Properties:
|
Project |
klicker-uzh
|
Branch Review |
testing-case-study-pq
|
Run status |
Passed #4218
|
Run duration | 22m 05s |
Commit |
7c36913cfa ℹ️: Merge f83e197f7ef06dba69075b695d7eaeba9fa1d973 into c6287259828c97774c59a900d9db...
|
Committer | Julius Schlapbach |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
325
|
View all changes introduced in this branch ↗︎ |
Summary by CodeRabbit