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
d9da46c5
Commit
d9da46c5
authored
Nov 24, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine current group creation form
- collapse some items and move out in prep for inviting members.
parent
e56279d0
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
50 additions
and
39 deletions
+50
-39
app/views/admin/groups/_form.html.haml
app/views/admin/groups/_form.html.haml
+1
-0
app/views/groups/_new_group_fields.html.haml
app/views/groups/_new_group_fields.html.haml
+0
-5
app/views/shared/_group_form.html.haml
app/views/shared/_group_form.html.haml
+0
-8
app/views/shared/_group_form_description.html.haml
app/views/shared/_group_form_description.html.haml
+5
-0
changelogs/unreleased/219241-refine-group-creation-form.yml
changelogs/unreleased/219241-refine-group-creation-form.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-3
qa/qa/page/group/new.rb
qa/qa/page/group/new.rb
+0
-5
qa/qa/resource/group.rb
qa/qa/resource/group.rb
+0
-1
qa/qa/resource/sandbox.rb
qa/qa/resource/sandbox.rb
+0
-1
spec/features/admin/admin_groups_spec.rb
spec/features/admin/admin_groups_spec.rb
+15
-3
spec/features/dashboard/group_spec.rb
spec/features/dashboard/group_spec.rb
+0
-3
spec/features/groups_spec.rb
spec/features/groups_spec.rb
+24
-10
No files found.
app/views/admin/groups/_form.html.haml
View file @
d9da46c5
=
form_for
[
:admin
,
@group
]
do
|
f
|
=
form_errors
(
@group
)
=
render
'shared/group_form'
,
f:
f
=
render
'shared/group_form_description'
,
f:
f
=
render_if_exists
'shared/old_repository_size_limit_setting'
,
form:
f
,
type: :group
=
render_if_exists
'admin/namespace_plan'
,
f:
f
...
...
app/views/groups/_new_group_fields.html.haml
View file @
d9da46c5
...
...
@@ -2,11 +2,6 @@
=
render
'shared/group_form'
,
f:
f
,
autofocus:
true
.row
.form-group.group-description-holder.col-sm-12
=
f
.
label
:avatar
,
_
(
"Group avatar"
),
class:
'label-bold'
%div
=
render
'shared/choose_avatar_button'
,
f:
f
.form-group.col-sm-12
%label
.label-bold
=
_
(
'Visibility level'
)
...
...
app/views/shared/_group_form.html.haml
View file @
d9da46c5
...
...
@@ -47,11 +47,3 @@
=
f
.
label
:id
,
class:
'label-bold'
do
=
_
(
"Group ID"
)
=
f
.
text_field
:id
,
class:
'form-control'
,
readonly:
true
.row
.form-group.group-description-holder.col-sm-8
=
f
.
label
:description
,
class:
'label-bold'
do
=
_
(
"Group description"
)
%span
(optional)
=
f
.
text_area
:description
,
maxlength:
250
,
class:
'form-control js-gfm-input'
,
rows:
4
app/views/shared/_group_form_description.html.haml
0 → 100644
View file @
d9da46c5
.row
.form-group.group-description-holder.col-sm-8
=
f
.
label
:description
,
_
(
'Group description (optional)'
),
class:
'label-bold'
=
f
.
text_area
:description
,
maxlength:
250
,
class:
'form-control js-gfm-input'
,
rows:
4
changelogs/unreleased/219241-refine-group-creation-form.yml
0 → 100644
View file @
d9da46c5
---
title
:
Refine group creation form
merge_request
:
48490
author
:
type
:
changed
locale/gitlab.pot
View file @
d9da46c5
...
...
@@ -13226,9 +13226,6 @@ msgstr ""
msgid "Group by"
msgstr ""
msgid "Group description"
msgstr ""
msgid "Group description (optional)"
msgstr ""
...
...
qa/qa/page/group/new.rb
View file @
d9da46c5
...
...
@@ -7,7 +7,6 @@ module QA
view
'app/views/shared/_group_form.html.haml'
do
element
:group_path_field
,
'text_field :path'
# rubocop:disable QA/ElementWithPattern
element
:group_name_field
,
'text_field :name'
# rubocop:disable QA/ElementWithPattern
element
:group_description_field
,
'text_area :description'
# rubocop:disable QA/ElementWithPattern
end
view
'app/views/groups/_new_group_fields.html.haml'
do
...
...
@@ -20,10 +19,6 @@ module QA
fill_in
'group_name'
,
with:
path
end
def
set_description
(
description
)
fill_in
'group_description'
,
with:
description
end
def
set_visibility
(
visibility
)
choose
visibility
end
...
...
qa/qa/resource/group.rb
View file @
d9da46c5
...
...
@@ -36,7 +36,6 @@ module QA
Page
::
Group
::
New
.
perform
do
|
group_new
|
group_new
.
set_path
(
path
)
group_new
.
set_description
(
description
)
group_new
.
set_visibility
(
'Public'
)
group_new
.
create
end
...
...
qa/qa/resource/sandbox.rb
View file @
d9da46c5
...
...
@@ -31,7 +31,6 @@ module QA
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
set_path
(
path
)
group
.
set_description
(
'GitLab QA Sandbox Group'
)
group
.
set_visibility
(
'Public'
)
group
.
create
end
...
...
spec/features/admin/admin_groups_spec.rb
View file @
d9da46c5
...
...
@@ -7,9 +7,10 @@ RSpec.describe 'Admin Groups' do
include
Spec
::
Support
::
Helpers
::
Features
::
MembersHelpers
let
(
:internal
)
{
Gitlab
::
VisibilityLevel
::
INTERNAL
}
let
(
:user
)
{
create
:user
}
let!
(
:group
)
{
create
:group
}
let!
(
:current_user
)
{
create
(
:admin
)
}
let_it_be
(
:user
)
{
create
:user
}
let_it_be
(
:group
)
{
create
:group
}
let_it_be
(
:current_user
)
{
create
(
:admin
)
}
before
do
sign_in
(
current_user
)
...
...
@@ -26,6 +27,17 @@ RSpec.describe 'Admin Groups' do
end
describe
'create a group'
do
describe
'with expected fields'
do
it
'renders from as expected'
,
:aggregate_failures
do
visit
new_admin_group_path
expect
(
page
).
to
have_field
(
'name'
)
expect
(
page
).
to
have_field
(
'group_path'
)
expect
(
page
).
to
have_field
(
'group_visibility_level_0'
)
expect
(
page
).
to
have_field
(
'description'
)
end
end
it
'creates new group'
do
visit
admin_groups_path
...
...
spec/features/dashboard/group_spec.rb
View file @
d9da46c5
...
...
@@ -17,14 +17,11 @@ RSpec.describe 'Dashboard Group' do
visit
dashboard_groups_path
find
(
'.btn-success'
).
click
new_name
=
'Samurai'
new_description
=
'Tokugawa Shogunate'
fill_in
'group_name'
,
with:
new_name
fill_in
'group_description'
,
with:
new_description
click_button
'Create group'
expect
(
current_path
).
to
eq
group_path
(
Group
.
find_by
(
name:
new_name
))
expect
(
page
).
to
have_content
(
new_name
)
expect
(
page
).
to
have_content
(
new_description
)
end
end
spec/features/groups_spec.rb
View file @
d9da46c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
'Group'
do
let
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
...
...
@@ -36,6 +36,15 @@ RSpec.describe 'Group' do
end
end
describe
'with expected fields'
do
it
'renders from as expected'
,
:aggregate_failures
do
expect
(
page
).
to
have_field
(
'name'
)
expect
(
page
).
to
have_field
(
'group_path'
)
expect
(
page
).
to
have_field
(
'group_visibility_level_0'
)
expect
(
page
).
not_to
have_field
(
'description'
)
end
end
describe
'with space in group path'
do
it
'renders new group form with validation errors'
do
fill_in
'Group URL'
,
with:
'space group'
...
...
@@ -135,7 +144,7 @@ RSpec.describe 'Group' do
end
describe
'create a nested group'
,
:js
do
let
(
:group
)
{
create
(
:group
,
path:
'foo'
)
}
let
_it_be
(
:group
)
{
create
(
:group
,
path:
'foo'
)
}
context
'as admin'
do
let
(
:user
)
{
create
(
:admin
)
}
...
...
@@ -185,7 +194,7 @@ RSpec.describe 'Group' do
end
describe
'group edit'
,
:js
do
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:path
)
{
edit_group_path
(
group
)
}
let
(
:new_name
)
{
'new-name'
}
...
...
@@ -230,7 +239,7 @@ RSpec.describe 'Group' do
end
describe
'group page with markdown description'
do
let
(
:group
)
{
create
(
:group
)
}
let
_it_be
(
:group
)
{
create
(
:group
)
}
let
(
:path
)
{
group_path
(
group
)
}
before
do
...
...
@@ -271,9 +280,9 @@ RSpec.describe 'Group' do
end
describe
'group page with nested groups'
,
:js
do
let
!
(
:group
)
{
create
(
:group
)
}
let
!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let
!
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
_it_be
(
:group
)
{
create
(
:group
)
}
let
_it_be
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
before
do
group
.
add_owner
(
user
)
...
...
@@ -304,7 +313,11 @@ RSpec.describe 'Group' do
end
describe
'new subgroup / project button'
do
let
(
:group
)
{
create
(
:group
,
project_creation_level:
Gitlab
::
Access
::
NO_ONE_PROJECT_ACCESS
,
subgroup_creation_level:
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
}
let_it_be
(
:group
,
reload:
true
)
do
create
(
:group
,
project_creation_level:
Gitlab
::
Access
::
NO_ONE_PROJECT_ACCESS
,
subgroup_creation_level:
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
end
before
do
group
.
add_owner
(
user
)
...
...
@@ -341,6 +354,7 @@ RSpec.describe 'Group' do
context
'when user has project and subgroup creation permissions'
do
it
'displays "New subgroup" and "New project" buttons'
do
group
.
update!
(
project_creation_level:
Gitlab
::
Access
::
MAINTAINER_PROJECT_ACCESS
)
visit
group_path
(
group
)
page
.
within
'[data-testid="group-buttons"]'
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