Submitty icon indicating copy to clipboard operation
Submitty copied to clipboard

[Testing:Developer] Remove force clicks / waits test_forum

Open micpap25 opened this issue 1 year ago • 8 comments

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.

micpap25 avatar May 28 '24 19:05 micpap25

Would partially fix #10477

micpap25 avatar May 28 '24 19:05 micpap25

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.

micpap25 avatar May 29 '24 15:05 micpap25

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.

IDzyre avatar May 29 '24 17:05 IDzyre

This should probably be on the backburner until underlying issues with merge threads are resolved

micpap25 avatar May 30 '24 19:05 micpap25

@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

micpap25 avatar May 31 '24 16:05 micpap25

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.

IDzyre avatar May 31 '24 17:05 IDzyre

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.

williamschen23 avatar Jun 10 '24 14:06 williamschen23

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.

github-actions[bot] avatar Jun 27 '24 00:06 github-actions[bot]

@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.

williamjallen avatar Jul 04 '24 11:07 williamjallen

@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.

williamschen23 avatar Jul 04 '24 12:07 williamschen23

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).

micpap25 avatar Jul 08 '24 14:07 micpap25

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

Impacted file tree graph

@@             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.

codecov[bot] avatar Jul 08 '24 14:07 codecov[bot]