backport protected_branches_spec improvements from EE
This commit is contained in:
parent
3cbab382f6
commit
26b66e58ca
1 changed files with 17 additions and 9 deletions
|
@ -64,11 +64,18 @@ feature 'Protected Branches', :js do
|
||||||
describe "Saved defaults" do
|
describe "Saved defaults" do
|
||||||
it "keeps the allowed to merge and push dropdowns defaults based on the previous selection" do
|
it "keeps the allowed to merge and push dropdowns defaults based on the previous selection" do
|
||||||
visit project_protected_branches_path(project)
|
visit project_protected_branches_path(project)
|
||||||
|
form = '.js-new-protected-branch'
|
||||||
|
|
||||||
|
within form do
|
||||||
find(".js-allowed-to-merge").trigger('click')
|
find(".js-allowed-to-merge").trigger('click')
|
||||||
click_link 'No one'
|
click_link 'No one'
|
||||||
find(".js-allowed-to-push").trigger('click')
|
find(".js-allowed-to-push").trigger('click')
|
||||||
click_link 'Developers + Masters'
|
click_link 'Developers + Masters'
|
||||||
|
end
|
||||||
|
|
||||||
visit project_protected_branches_path(project)
|
visit project_protected_branches_path(project)
|
||||||
|
|
||||||
|
within form do
|
||||||
page.within(".js-allowed-to-merge") do
|
page.within(".js-allowed-to-merge") do
|
||||||
expect(page.find(".dropdown-toggle-text")).to have_content("No one")
|
expect(page.find(".dropdown-toggle-text")).to have_content("No one")
|
||||||
end
|
end
|
||||||
|
@ -78,6 +85,7 @@ feature 'Protected Branches', :js do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'logged in as admin' do
|
context 'logged in as admin' do
|
||||||
before do
|
before do
|
||||||
|
|
Loading…
Reference in a new issue