[Testing:Developer] Remove force clicks / waits test_forum
Please check if the PR fulfills these requirements:
- [x] Tests for the changes have been added/updated (if possible)
- [x] Documentation has been updated/added if relevant
- [x] Screenshots are attached to Github PR if visual/UI changes were made
The force-clicks and wait in this test don't serve a purpose and are bad practice. This removes them.
Would partially fix #10477
So it turns out the force-clicks are used to account for what seems to be an issue with the merge-thread dropdown in that sometimes the thread you want to merge doesn't appear (potentially due to recency of creation?) Waiting wouldn't change this. Something underlying about this needs to be fixed.
in this specific case, one of the force clicks are because the popup and dropdown for the merge thread goes over the edge of the popup, and scrolling down made even more flakiness, so just forcing it to click the desired dropdown option was the best route.
This should probably be on the backburner until underlying issues with merge threads are resolved
@IDzyre I had a conversation with Barb the other day; it might make sense to reformat the tests such that the scroll is not necessary (the thread we want to merge with will be searched so it's at the top of the list), then it will reduce flakiness / need for force-clicks
The force clicks were the way to get around scrolling, since in Cypress, { force: true } clicks on the element no matter if it's visible or not. I agree that the wait should be removed. This was one of the first tests I worked on when I was first starting with Cypress, and so I didn't use the best selectors, and no testids. This one should be refactored to use testids.
I think we should wait until #10382 is merged because it refactors some of the code to use better selectors, and I'm going to mark this as a draft.
This PR has been inactive (no commits and no review comments) for 12 days. If there is no new activity in the next 48 hours, this PR will be labeled as Abandoned PR - Needs New Owner and either another developer will finish the PR or it will be closed.
@williamschen23 and @micpap25, what's the status of this PR? As per https://github.com/Submitty/Submitty/pull/10480#issuecomment-2158585287, this was waiting for https://github.com/Submitty/Submitty/pull/10382 which has now been merged.
@williamschen23 and @micpap25, what's the status of this PR? As per #10480 (comment), this was waiting for #10382 which has now been merged.
I tried after #10382 got merged and did not get far. Since this was Michaels PR, I figured he would pick it back up. Since then, forums got another wait if I remember correctly.
Picking this back up, though I might just close it because the issue with it does stem back at merge threads being slow (which i can't address).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 38.47%. Comparing base (
ac9f2d5) to head (c1f1cb9). Report is 26 commits behind head on main.
:exclamation: There is a different number of reports uploaded between BASE (ac9f2d5) and HEAD (c1f1cb9). Click for more details.
HEAD has 1 upload less than BASE
Flag BASE (ac9f2d5) HEAD (c1f1cb9) submitty_daemon_jobs 1 0
Additional details and impacted files
@@ Coverage Diff @@
## main #10480 +/- ##
===========================================
- Coverage 48.75% 38.47% -10.29%
===========================================
Files 32 36 +4
Lines 3095 3067 -28
Branches 0 80 +80
===========================================
- Hits 1509 1180 -329
- Misses 1586 1810 +224
- Partials 0 77 +77
| Flag | Coverage Δ | |
|---|---|---|
| autograder | 21.58% <0.00%> (ø) |
|
| js | 26.22% <0.00%> (?) |
|
| migrator | 100.00% <0.00%> (ø) |
|
| python_submitty_utils | 80.56% <0.00%> (ø) |
|
| submitty_daemon_jobs | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.