Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-09-20 21:24:24 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-09-20 22:11:45 +0300
commitf68b3aaaadac6658f8c2b5c330873582e44b87f8 (patch)
tree9a066ce109a9c4073dc6660bb9e4574f588b4466 /spec/features/protected_branches_spec.rb
parentd15109dc5e6185b512785611cd3d146010e1eacc (diff)
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.rb18
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