Commit 987df199 authored by Stan Hu's avatar Stan Hu

Possible fix for flaky sidebar specs

In both EE and FOSS specs, two labels are clicked in quick succession.
When the test fails, it appears that the first label was never actually
clicked.

To prevent some timing issue, we now pause after the first click to
verify the right number of active labels are present in the dropdown.

Closes https://gitlab.com/gitlab-org/gitlab/issues/118659
parent 11a1dc12
...@@ -271,6 +271,7 @@ describe 'Issue Boards', :js do ...@@ -271,6 +271,7 @@ describe 'Issue Boards', :js do
wait_for_requests wait_for_requests
click_link scoped_label_1.title click_link scoped_label_1.title
within('.dropdown-menu-labels') { expect(page).to have_selector('.is-active', count: 2) }
click_link scoped_label_2.title click_link scoped_label_2.title
wait_for_requests wait_for_requests
......
...@@ -318,6 +318,7 @@ describe 'Issue Boards', :js do ...@@ -318,6 +318,7 @@ describe 'Issue Boards', :js do
wait_for_requests wait_for_requests
click_link bug.title click_link bug.title
within('.dropdown-menu-labels') { expect(page).to have_selector('.is-active', count: 3) }
click_link regression.title click_link regression.title
wait_for_requests wait_for_requests
......
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