Commit 745db030 authored by Nick Thomas's avatar Nick Thomas

Try to fix some EE protected branches specs

parent 1c93759b
...@@ -98,6 +98,7 @@ shared_examples "protected branches > access control > EE" do ...@@ -98,6 +98,7 @@ shared_examples "protected branches > access control > EE" do
within(".protected-branches-list") do within(".protected-branches-list") do
find(".js-allowed-to-#{git_operation}").trigger(: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
wait_for_requests
expect(page).to have_selector('.dropdown-header', count: 3) expect(page).to have_selector('.dropdown-header', count: 3)
...@@ -105,7 +106,6 @@ shared_examples "protected branches > access control > EE" do ...@@ -105,7 +106,6 @@ shared_examples "protected branches > access control > EE" do
expect(all('.dropdown-header')[index]).to have_content(header) expect(all('.dropdown-header')[index]).to have_content(header)
end end
wait_for_requests
click_on users.last.name click_on users.last.name
find(".js-allowed-to-#{git_operation}").trigger(:click) # close find(".js-allowed-to-#{git_operation}").trigger(:click) # close
end end
...@@ -113,6 +113,7 @@ shared_examples "protected branches > access control > EE" do ...@@ -113,6 +113,7 @@ shared_examples "protected branches > access control > EE" do
# 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}").trigger(:click) find(".protected-branches-list .js-allowed-to-#{git_operation}").trigger(:click)
wait_for_requests
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