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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
cd4073ca
Commit
cd4073ca
authored
Mar 07, 2017
by
David Piegza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update feature visibility spec for projects edit page
parent
130fd255
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
spec/features/projects/edit_spec.rb
spec/features/projects/edit_spec.rb
+11
-19
No files found.
spec/features/projects/edit_spec.rb
View file @
cd4073ca
...
@@ -21,37 +21,29 @@ feature 'Project edit', feature: true, js: true do
...
@@ -21,37 +21,29 @@ feature 'Project edit', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
end
end
it
'hides merge requests section after save'
do
context
'given project with merge_requests_disabled access level'
do
select
(
'Disabled'
,
from:
'project_project_feature_attributes_merge_requests_access_level'
)
let
(
:project
)
{
create
(
:project
,
:merge_requests_disabled
)
}
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
click_button
'Save changes'
wait_for_ajax
it
'hides merge requests section'
do
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
end
end
end
end
end
context
'builds select'
do
context
'builds select'
do
it
'hides
merge requests
section'
do
it
'hides
builds select
section'
do
select
(
'Disabled'
,
from:
'project_project_feature_attributes_builds_access_level'
)
select
(
'Disabled'
,
from:
'project_project_feature_attributes_builds_access_level'
)
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
end
end
it
'hides merge requests section after save'
do
context
'given project with builds_disabled access level'
do
select
(
'Disabled'
,
from:
'project_project_feature_attributes_builds_access_level'
)
let
(
:project
)
{
create
(
:project
,
:builds_disabled
)
}
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
click_button
'Save changes'
wait_for_ajax
it
'hides builds select section'
do
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
end
end
end
end
end
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