diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-20 13:24:24 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-20 14:11:45 -0500 |
commit | f68b3aaaadac6658f8c2b5c330873582e44b87f8 (patch) | |
tree | 9a066ce109a9c4073dc6660bb9e4574f588b4466 /spec/features/protected_branches_spec.rb | |
parent | d15109dc5e6185b512785611cd3d146010e1eacc (diff) | |
download | gitlab-ce-f68b3aaaadac6658f8c2b5c330873582e44b87f8.tar.gz |
Added defaults for the protected branches dropdowns for the repository settings
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r-- | spec/features/protected_branches_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index 3677bf38724..a28bc8f952f 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -90,4 +90,22 @@ feature 'Protected Branches', js: true do describe "access control" do include_examples "protected branches > access control > CE" end + + describe "saved defaults" do + it "keeps the allowed to merge and push dropdowns defaults based on the previous selection" do + visit project_protected_branches_path(project) + set_protected_branch_name('some-branch') + find(".js-allowed-to-merge").trigger('click') + click_link 'No one' + find(".js-allowed-to-push").trigger('click') + click_link 'Developers + Masters' + visit project_protected_branches_path(project) + page.within(".js-allowed-to-merge") do + expect(page.find(".dropdown-toggle-text")).to have_content("No one") + end + page.within(".js-allowed-to-push") do + expect(page.find(".dropdown-toggle-text")).to have_content("Developers + Masters") + end + end + end end |