medic / angular10-migration

0 stars 0 forks source link

Flacky tests "goToReportsNative" sometimes doesn't redirect to reports #140

Closed dianabarsan closed 2 years ago

dianabarsan commented 3 years ago
1) Submit Delivery Report open delivery form
  - Failed: waitElementToBeVisible timed out looking for By(css selector, *[id="reports-list"])
  Wait timed out after 15006ms

Example build: https://github.com/medic/cht-core/runs/1901242176#step:18:605

dianabarsan commented 3 years ago

I haven't been able to replicate this (or see an obvious reason why it would happen). The build where I saw it fail was rerun (successfully), so the artifact was lost.

dianabarsan commented 3 years ago

Ok, I found a new build that failed similartly: https://github.com/medic/cht-core/runs/1903188242

Different test but it called the same function, that would redirect to reports. This run should have an artifact available to download, and it looks like the redirect to reports didn't work: image

1) Family form Submit Add Family form
  - Failed: waitElementToBeVisible timed out looking for By(css selector, *[id="reports-list"])
  Wait timed out after 15006ms

I've updated the title of the issue to reflect this.

dianabarsan commented 3 years ago

My suspicion is that some test doesn't await for something that ends up performing a redirect farther down the execution chain, while this other test is running.

latin-panda commented 3 years ago

I was able to get the error, I'm going to try fixing it 😬

latin-panda commented 3 years ago

I couldn't reproduce the redirection behaviour but end up fixing a couple of other things. I haven't seen the flaky test back again but moving this ticket back to ToDo in case we get the error again 🤞

dianabarsan commented 3 years ago

Cool, thanks @latin-panda . I've added a new label, so it's clear that reproducing is an issue.

dianabarsan commented 3 years ago

This just happened again in this build: https://github.com/medic/cht-core/runs/1942374212

image

dianabarsan commented 3 years ago

And again here: https://github.com/medic/cht-core/pull/6952/checks?check_run_id=1942499228

dianabarsan commented 3 years ago

Yet another manifestation of the same issue: image

build: https://github.com/medic/cht-core/runs/1940713713