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
3874239b
Commit
3874239b
authored
Mar 16, 2021
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs
parent
1ce71550
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
spec/features/groups_spec.rb
spec/features/groups_spec.rb
+41
-0
No files found.
spec/features/groups_spec.rb
View file @
3874239b
...
...
@@ -141,6 +141,30 @@ RSpec.describe 'Group' do
end
end
end
describe
'showing recaptcha on group creation when it is enabled'
do
before
do
stub_application_setting
(
recaptcha_enabled:
true
)
allow
(
Gitlab
::
Recaptcha
).
to
receive
(
:load_configurations!
)
visit
new_group_path
end
it
'renders recaptcha'
do
expect
(
page
).
to
have_css
(
'.recaptcha'
)
end
end
describe
'not showing recaptcha on group creation when it is disabled'
do
before
do
stub_feature_flags
(
recaptcha_on_top_level_group_creation:
false
)
stub_application_setting
(
recaptcha_enabled:
true
)
visit
new_group_path
end
it
'does not render recaptcha'
do
expect
(
page
).
not_to
have_css
(
'.recaptcha'
)
end
end
end
describe
'create a nested group'
do
...
...
@@ -189,6 +213,23 @@ RSpec.describe 'Group' do
expect
(
page
).
to
have_content
(
"Group 'bar' was successfully created."
)
end
end
context
'when recaptcha is enabled'
do
before
do
stub_application_setting
(
recaptcha_enabled:
true
)
allow
(
Gitlab
::
Recaptcha
).
to
receive
(
:load_configurations!
)
end
context
'when creating subgroup'
do
let
(
:path
)
{
new_group_path
(
group
,
parent_id:
group
.
id
)
}
it
'does not render recaptcha'
do
visit
path
expect
(
page
).
not_to
have_css
(
'.recaptcha'
)
end
end
end
end
it
'checks permissions to avoid exposing groups by parent_id'
do
...
...
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