sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.3k stars 219 forks source link

fix flaky test #4579

Closed beyang closed 1 month ago

beyang commented 1 month ago

It's better to use a FrameLocator rather than a Frame in playwright, as a Frame can be invalidated by a navigation action. Fixes a sometimes-flaky test by using an appropriate FrameLocator, instead of a Frame, to target the Cody sidebar.

Test plan

Test-only change.

olafurpg commented 1 month ago

The test here still seems to be flaky, I saw it failing three times in my PR here https://github.com/sourcegraph/cody/pull/4591#issuecomment-2174170405

toolmantim commented 1 month ago

Same here @olafurpg — up to retry number 10 on this test in #4584: https://github.com/sourcegraph/cody/actions/runs/9556626326/job/26348897445 — strangely there's no artifact upload happening either. Worked the 11th time.