bcgov / wps

Wildfire Predictive Services to support decision making in prevention, preparedness, response and recovery
Apache License 2.0
36 stars 6 forks source link

Flaky Cypress tests #1426

Closed conbrad closed 1 month ago

conbrad commented 2 years ago

Describe the Bug Flaky Cypress tests on multiple pages. Fails intermittently. E.g.

After DatePicker test was skipped:

After DatePicker change and tests re-enabled:

Expected Behaviour Should always pass.

Actual Behaviour Doesn't always pass

Steps To Reproduce Steps to reproduce the behaviour:

  1. Make a PR
  2. Get unlucky
  3. Cypress test fails on the web integration pipeline
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Sybrand commented 2 years ago

1) Should display error messages when network errors occurred ✓ Should display a map with OpenLayers (2109ms) ✓ Should display the station accuracy for date label (2469ms) When loading a single station from url ✓ should load with an observation table (2920ms) ✓ should load a table comparing forecasts to noon observations (2757ms) When loading multiple stations from url ✓ Should display station comparison table (2039ms) When wx data for multiple stations fetched ✓ Should display station comparison table (5042ms) When wx data successfully fetched ✓ Observation, noon forecast, and noon GDPS should be displayed in tables in default active tab (8830ms) ✓ Should show the legend (3122ms) ✓ Should expand the side panel when it is collapsed, and hide the legend (3639ms) ✓ Should collapse the side panel when it is expanded and the legend should be visible (3979ms) ✓ Should close the side panel and the legend should be visible (3660ms) When graphs tab is clicked ✓ Temp & RH Graph should be displayed (18155ms) ✓ Precipitation graph should be displayed (8445ms) ✓ Wind speed & direction graph should be displayed (11645ms) ✓ Can toggle back to tables (6265ms)

16 passing (2m) 1 failing

1) MoreCast Page Should display error messages when network errors occurred: AssertionError: Timed out retrying after 4000ms: expected '[ , 7 more... ]' to contain 'Error occurred (while fetching RDPS summaries).' at Context.eval (http://localhost:3030/__cypress/tests?p=cypress/support/index.ts:262:37)

conbrad commented 1 month ago

Old flaky outputs, most tests not flakey anymore