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:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-05 16:52:49 +0300
committerTim Zallmann <tzallmann@gitlab.com>2017-10-05 16:52:49 +0300
commit5725e347ebdf04481a4eb7f82ce5db8c32b209b6 (patch)
tree9fba56795d6a27e24231f0c4eb9a0b149d33e25d /spec/features/protected_branches_spec.rb
parentbf9bd0683d9184b33769954aad436f577967ee00 (diff)
parent91384251bbc675a3a5b4b16b781f2811d6cab959 (diff)
Merge branch '32163-protected-branch-form-should-have-sane-defaults-for-dropdowns' into 'master'
Resolve "Protected branch form should have sane defaults for dropdowns" Closes #32163 See merge request gitlab-org/gitlab-ce!14278
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 bf9885f73bd..44c20d4a8d5 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -150,4 +150,22 @@ feature 'Protected Branches', :js do
find(".dropdown-input-field").set(branch_name)
click_on("Create wildcard #{branch_name}")
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