Commit 0d2e4897 authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '233462-flaky-spec-in-spec-features-issues-gfm_autocomplete_spec-rb-gfm-autocomplete-when' into 'master'

Fix flaky spec in spec/features/issues/gfm_autocomplete_spec.rb

Closes #233462

See merge request gitlab-org/gitlab!39083
parents fc8e4892 a0d48515
......@@ -43,7 +43,12 @@ const autoCompleteMap = {
const fullText = this.$slots.default?.[0]?.elm?.value;
const selectionStart = this.$slots.default?.[0]?.elm?.selectionStart;
if (!this.assignees) {
// Need to check whether sidebar store assignees has been updated
// in the case where the assignees AJAX response comes after the user does @ autocomplete
const isAssigneesLengthSame =
this.assignees?.length === SidebarMediator.singleton?.store?.assignees?.length;
if (!this.assignees || !isAssigneesLengthSame) {
this.assignees =
SidebarMediator.singleton?.store?.assignees?.map(assignee => assignee.username) || [];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment