openproject icon indicating copy to clipboard operation
openproject copied to clipboard

Fix flaky spec

Open cbliard opened this issue 2 months ago • 2 comments

spec is ./spec/features/work_packages/details/relations/hierarchy_spec.rb:64 workflow run is https://github.com/opf/openproject/actions/runs/19865114022/job/56995802896?pr=21312

Seen in PR #21312

Actually, the issue in the workflow run is not the same as the one being fixed with this commit. Still it's fixing a flakiness.

in Components::Autocompleter::NgSelectAutocompleteHelpers#ng_enter_query the keys are sent only if length is greater than 1.

Problem is that sometimes the query is only one character, for instance when typing a work package id. If the database is new, ids are small and their length is 1. So they are not typed and the test fails.

It is flaky because it does not occur when ids are greater than 10.

Fix is to remove that condition and always type the query string.

cbliard avatar Dec 03 '25 09:12 cbliard

The failing specs are genuine

mrmir avatar Dec 03 '25 09:12 mrmir

rebasing on release/17.0

cbliard avatar Dec 04 '25 08:12 cbliard