Theme switcher e2e test flakiness
Created by: felixfbecker
In this build, the theme switcher e2e test failed: https://buildkite.com/sourcegraph/sourcegraph/builds/43747#b2fd9347-df48-4653-91a7-58d22131fa10
It failed because while the body
already had the theme
class (ensured by waitForSelector()
, the precondition of having a theme-dark
or theme-light
class was not met (yet) and the assertion right after failed.
The problem here is the general problem of instantly asserting instead of using waitForFunction()
/waitForSelector()
or retry()
.