Commit f58986b3 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-intermittent-spec-failure' into 'master'

Use trigger(:click) in some feature specs to avoid intermittent failures

See merge request !2485
parents b6326824 f6784266
...@@ -96,7 +96,7 @@ shared_examples "protected branches > access control > EE" do ...@@ -96,7 +96,7 @@ shared_examples "protected branches > access control > EE" do
# Update Protected Branch # Update Protected Branch
within(".protected-branches-list") do within(".protected-branches-list") do
find(".js-allowed-to-#{git_operation}").click find(".js-allowed-to-#{git_operation}").trigger(:click)
find(".dropdown-input-field").set(users.last.name) # Find a user that is not loaded find(".dropdown-input-field").set(users.last.name) # Find a user that is not loaded
expect(page).to have_selector('.dropdown-header', count: 3) expect(page).to have_selector('.dropdown-header', count: 3)
...@@ -112,7 +112,7 @@ shared_examples "protected branches > access control > EE" do ...@@ -112,7 +112,7 @@ shared_examples "protected branches > access control > EE" do
wait_for_requests wait_for_requests
# Verify the user is appended in the dropdown # Verify the user is appended in the dropdown
find(".protected-branches-list .js-allowed-to-#{git_operation}").click find(".protected-branches-list .js-allowed-to-#{git_operation}").trigger(:click)
expect(page).to have_selector '.dropdown-content .is-active', text: users.last.name expect(page).to have_selector '.dropdown-content .is-active', text: users.last.name
expect(ProtectedBranch.count).to eq(1) expect(ProtectedBranch.count).to eq(1)
......
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