Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
be37bcad9640
Commit
10dfa993
authored
Oct 05, 2017
by
Jose Ivan Vargas
Browse files
fix protected_branch spec describe block
parent
83138ceae3a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec/features/protected_branches_spec.rb
View file @
be37bcad
...
...
@@ -60,6 +60,23 @@
expect
(
page
).
to
have_content
(
'No branches to show'
)
end
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
)
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
context
'logged in as admin'
do
...
...
@@ -150,22 +167,4 @@ def set_protected_branch_name(branch_name)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment