[Testing:InstructorUI] Added Cypress test for locked gradeable#11364
Conversation
added a cypress test for checking appropriate message to be displayed upon clicking a locked gradeable.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11364 +/- ##
============================================
+ Coverage 22.10% 22.12% +0.01%
- Complexity 8947 8949 +2
============================================
Files 247 247
Lines 32235 32243 +8
Branches 83 83
============================================
+ Hits 7125 7133 +8
Misses 25031 25031
Partials 79 79
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
fixed minor lint issues
removed data-testid from input values.
the excessive query calls were causing the cypress UI test to fail
had commented out the previous tests
changed gradeableid
|
@williamschen23 , sorry for pinging on weekend, but I just wanted to know if there's any procedure for debugging |
used data test id for gradeable-lock and also changed test gradeable to cypress test gradeable.
removed arbitrary waiting time
removed subscript from cypress_test_gradeable
There was a problem hiding this comment.
For me, I would rather make a new gradeable in the course config that has a lock on another gradeable. Creating a gradeable comes with verifying that the creation of gradeable works, which was already done in another test
I will defer the review to @IDzyre
|
Do we not already have a gradeable that is 'locked' ? The sample course is (i think) supposed to have examples for instructors to follow when it comes to different types of gradeables. I would be in favor of having another gradeable created with the setup_sample_course script, if there is not already one made. |
|
There are team-locked gradeables, none of them are for pre-requisite gradeables. I also don't see the field in courses.yml, so we might need to add that... |
done. |
Now, the cypress testing is done on the existing locked gradeables, for all 3 levels. |
|
@williamschen23 , sorry for pinging. I made the changes you had requested for (i.e to create a locked gradeable using the script). However, the creation of one extra course is causing the metrics of other courses to change, due to which the cypress tests are failing. Could you guide me further on how to proceed with fixing these tests? |
This is all based off of memory, but doing |
|
Hey, I'm working on this. Will update today |
|
@williamschen23 I've updated the PR but unable to repro this one last test failure. Would need your help in understanding the root cause involved here |


added a cypress test for checking appropriate message to be displayed upon clicking a locked gradeable.
Please check if the PR fulfills these requirements:
What is the current behavior?
There was no way to test the alert on clicking on a locked gradeable.
What is the new behavior?
Fixes #11160
Cypress tests and matches the appropriate message to be displayed for the locked gradeable upon being clicked.
Other information?