Skip to content
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

Fix failing cypress test for range changes in chartview #2111

Closed
MarcusTXK opened this issue Feb 14, 2024 · 4 comments · Fixed by #2114
Closed

Fix failing cypress test for range changes in chartview #2111

MarcusTXK opened this issue Feb 14, 2024 · 4 comments · Fixed by #2114
Assignees

Comments

@MarcusTXK
Copy link
Member

What was expected to happen?

Currently the following frontend test cases are failing in the github CI

  1) range changes in chartview should reflect in zoom
       selecting the initial righthand and lefthand boundary:

      Timed out retrying after 30000ms
      + expected - actual

      -'[2019-12-31] [#785] ChartView: fix authors with unaccounted lines (#789): +49 -42 lines '
      +'[2019-12-20] [#46] Show total time after batch processing (#758): +43 -0 lines '
      
      at Context.eval (webpack:///./tests/chartView/chartView_zoomFeature.cy.js:270:7)

  2) range changes in chartview should reflect in zoom
       changing the righthand boundary:

      Timed out retrying after 30000ms
      + expected - actual

      -'[2019-12-31] [#785] ChartView: fix authors with unaccounted lines (#789): +49 -42 lines '
      +'[2019-12-20] [#46] Show total time after batch processing (#758): +43 -0 lines '
      
      at Context.eval (webpack:///./tests/chartView/chartView_zoomFeature.cy.js:296:7)

What actually happened? Please include a screenshot of the output.

image

Link to one such failing CI instance
https://github.com/reposense/RepoSense/actions/runs/7862260141/job/21464243013?pr=2078#step:10:415

@jonasongg
Copy link
Contributor

jonasongg commented Feb 15, 2024

Just investigating for a bit, this might be caused by the ramp shrinking as time goes on (since the until date is not set, defaults to today).

For now, I managed to fix this by setting "until" in the filters to an arbitrary time in the past before this problem arose (I chose 31/12/2023)

image
(adding lines 341-342 to every test that fails)

This seems to be the same problem as #2066. Let me know if this fixes the problem for you and if I should create a PR for this!

@MarcusTXK
Copy link
Member Author

MarcusTXK commented Feb 15, 2024

Hi @jonasongg, thanks for the quick investigation. I think your suggestion is a good way to solve it, works for me too. I think it is fine to just set an arbitrary time as this will prevent the issue from happening again as more time passes. Please do feel free to create a PR for this if you have the time to do so.

@ckcherry23
Copy link
Member

Hi @jonasongg, I'd recommend prioritising the PR to fix this first as other PRs would be blocked from merging until all CI tests pass. Thank you!

@jonasongg
Copy link
Contributor

@MarcusTXK @ckcherry23 just created a PR for this!

ckcherry23 pushed a commit that referenced this issue Feb 16, 2024
Fix nondeterministically failing zoomFeature cypress test

The "range changes in chartview should reflect in zoom" test in
chartView_zoomFeature.cy.js fails because as time passes, the
coordinates in the ramp that correspond to the desired zoom area
change.

Let's add an "until" filter to the relevant cypress tests to stop this
from happening
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed/Completed
Development

Successfully merging a pull request may close this issue.

3 participants