Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f4c2bc10
Commit
f4c2bc10
authored
Jun 28, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove set_defaults in protected_branches_spec
parent
34af8e5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
spec/features/protected_branches_spec.rb
spec/features/protected_branches_spec.rb
+0
-20
No files found.
spec/features/protected_branches_spec.rb
View file @
f4c2bc10
...
@@ -72,7 +72,6 @@ feature 'Protected Branches', :js do
...
@@ -72,7 +72,6 @@ feature 'Protected Branches', :js do
describe
"explicit protected branches"
do
describe
"explicit protected branches"
do
it
"allows creating explicit protected branches"
do
it
"allows creating explicit protected branches"
do
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
set_defaults
set_protected_branch_name
(
'some-branch'
)
set_protected_branch_name
(
'some-branch'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
...
@@ -88,7 +87,6 @@ feature 'Protected Branches', :js do
...
@@ -88,7 +87,6 @@ feature 'Protected Branches', :js do
project
.
repository
.
add_branch
(
admin
,
'some-branch'
,
commit
.
id
)
project
.
repository
.
add_branch
(
admin
,
'some-branch'
,
commit
.
id
)
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
set_defaults
set_protected_branch_name
(
'some-branch'
)
set_protected_branch_name
(
'some-branch'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
...
@@ -99,7 +97,6 @@ feature 'Protected Branches', :js do
...
@@ -99,7 +97,6 @@ feature 'Protected Branches', :js do
it
"displays an error message if the named branch does not exist"
do
it
"displays an error message if the named branch does not exist"
do
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
set_defaults
set_protected_branch_name
(
'some-branch'
)
set_protected_branch_name
(
'some-branch'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
...
@@ -112,7 +109,6 @@ feature 'Protected Branches', :js do
...
@@ -112,7 +109,6 @@ feature 'Protected Branches', :js do
describe
"wildcard protected branches"
do
describe
"wildcard protected branches"
do
it
"allows creating protected branches with a wildcard"
do
it
"allows creating protected branches with a wildcard"
do
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
set_defaults
set_protected_branch_name
(
'*-stable'
)
set_protected_branch_name
(
'*-stable'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
...
@@ -128,7 +124,6 @@ feature 'Protected Branches', :js do
...
@@ -128,7 +124,6 @@ feature 'Protected Branches', :js do
project
.
repository
.
add_branch
(
admin
,
'staging-stable'
,
'master'
)
project
.
repository
.
add_branch
(
admin
,
'staging-stable'
,
'master'
)
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
set_defaults
set_protected_branch_name
(
'*-stable'
)
set_protected_branch_name
(
'*-stable'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
...
@@ -149,7 +144,6 @@ feature 'Protected Branches', :js do
...
@@ -149,7 +144,6 @@ feature 'Protected Branches', :js do
set_protected_branch_name
(
'*-stable'
)
set_protected_branch_name
(
'*-stable'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'merge'
)
set_allowed_to
(
'push'
)
set_allowed_to
(
'push'
)
set_defaults
click_on
"Protect"
click_on
"Protect"
visit
project_protected_branches_path
(
project
)
visit
project_protected_branches_path
(
project
)
...
@@ -234,18 +228,4 @@ feature 'Protected Branches', :js do
...
@@ -234,18 +228,4 @@ feature 'Protected Branches', :js do
find
(
".dropdown-input-field"
).
set
(
branch_name
)
find
(
".dropdown-input-field"
).
set
(
branch_name
)
click_on
(
"Create wildcard
#{
branch_name
}
"
)
click_on
(
"Create wildcard
#{
branch_name
}
"
)
end
end
def
set_defaults
find
(
".js-allowed-to-merge"
).
click
within
(
'.qa-allowed-to-merge-dropdown'
)
do
expect
(
first
(
"li"
)).
to
have_content
(
"Roles"
)
find
(
:link
,
'No one'
).
click
end
find
(
".js-allowed-to-push"
).
click
within
(
'.qa-allowed-to-push-dropdown'
)
do
expect
(
first
(
"li"
)).
to
have_content
(
"Roles"
)
find
(
:link
,
'No one'
).
click
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