BigW Consortium Gitlab

Try waiting for previous dropdown to definitly close before going to click

parent f30ab494
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.form-group .form-group
= f.label :name, class: 'col-md-2 text-right' do = f.label :name, class: 'col-md-2 text-right' do
Tag: Tag:
.col-md-10 .col-md-10.protected-tags-dropdown
= render partial: "projects/protected_tags/dropdown", locals: { f: f } = render partial: "projects/protected_tags/dropdown", locals: { f: f }
.help-block .help-block
= link_to 'Wildcards', help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags') = link_to 'Wildcards', help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags')
......
RSpec.shared_examples "protected tags > access control > CE" do RSpec.shared_examples "protected tags > access control > CE" do
ProtectedTag::CreateAccessLevel.human_access_levels.each do |(access_type_id, access_type_name)| ProtectedTag::CreateAccessLevel.human_access_levels.each do |(access_type_id, access_type_name)|
it "allows creating protected tags that #{access_type_name} can create" do it "allows creating protected tags that #{access_type_name} can create", :js do
visit namespace_project_protected_tags_path(project.namespace, project) visit namespace_project_protected_tags_path(project.namespace, project)
set_protected_tag_name('master') set_protected_tag_name('master')
...@@ -10,8 +10,9 @@ RSpec.shared_examples "protected tags > access control > CE" do ...@@ -10,8 +10,9 @@ RSpec.shared_examples "protected tags > access control > CE" do
unless allowed_to_create_button.text == access_type_name unless allowed_to_create_button.text == access_type_name
allowed_to_create_button.click allowed_to_create_button.click
find('.dropdown.open .dropdown-menu li', match: :first) find('.create_access_levels-container .dropdown-menu li', match: :first)
within(".dropdown.open .dropdown-menu") { click_on access_type_name } screenshot_and_open_image
within('.create_access_levels-container .dropdown-menu') { click_on access_type_name }
end end
end end
......
...@@ -11,6 +11,7 @@ feature 'Projected Tags', feature: true, js: true do ...@@ -11,6 +11,7 @@ feature 'Projected Tags', feature: true, js: true do
find(".js-protected-tag-select").click find(".js-protected-tag-select").click
find(".dropdown-input-field").set(tag_name) find(".dropdown-input-field").set(tag_name)
click_on("Create wildcard #{tag_name}") click_on("Create wildcard #{tag_name}")
find('.protected-tags-dropdown .dropdown-menu', visible: false)
end end
describe "explicit protected tags" do describe "explicit protected tags" do
......
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