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
50d2d7f9
Commit
50d2d7f9
authored
7 years ago
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
bdb9a0bc
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/projects/project_new.js
app/assets/javascripts/projects/project_new.js
+1
-1
app/views/projects/_new_project_fields.html.haml
app/views/projects/_new_project_fields.html.haml
+2
-2
spec/features/projects/new_project_spec.rb
spec/features/projects/new_project_spec.rb
+3
-3
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+1
-1
No files found.
app/assets/javascripts/projects/project_new.js
View file @
50d2d7f9
...
@@ -34,7 +34,7 @@ const bindEvents = () => {
...
@@ -34,7 +34,7 @@ const bindEvents = () => {
const
$selectedTemplateText
=
$
(
'
.selected-template
'
);
const
$selectedTemplateText
=
$
(
'
.selected-template
'
);
const
$changeTemplateBtn
=
$
(
'
.change-template
'
);
const
$changeTemplateBtn
=
$
(
'
.change-template
'
);
const
$selectedIcon
=
$
(
'
.selected-icon svg
'
);
const
$selectedIcon
=
$
(
'
.selected-icon svg
'
);
const
$templateProjectNameInput
=
$
(
'
#template-project-name
'
);
const
$templateProjectNameInput
=
$
(
'
#template-project-name
#project_path
'
);
if
(
$newProjectForm
.
length
!==
1
)
{
if
(
$newProjectForm
.
length
!==
1
)
{
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/_new_project_fields.html.haml
View file @
50d2d7f9
-
visibility_level
=
params
.
dig
(
:project
,
:visibility_level
)
||
default_project_visibility
-
visibility_level
=
params
.
dig
(
:project
,
:visibility_level
)
||
default_project_visibility
.row
.row
{
id:
project_name_id
}
.form-group.project-path.col-sm-6
.form-group.project-path.col-sm-6
=
f
.
label
:namespace_id
,
class:
'label-light'
do
=
f
.
label
:namespace_id
,
class:
'label-light'
do
%span
%span
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
=
f
.
label
:path
,
class:
'label-light'
do
=
f
.
label
:path
,
class:
'label-light'
do
%span
%span
Project name
Project name
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
id:
project_name_id
,
class:
"form-control"
,
tabindex:
2
,
autofocus:
true
,
required:
true
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
class:
"form-control"
,
tabindex:
2
,
autofocus:
true
,
required:
true
-
if
current_user
.
can_create_group?
-
if
current_user
.
can_create_group?
.help-block
.help-block
Want to house several dependent projects under the same namespace?
Want to house several dependent projects under the same namespace?
...
...
This diff is collapsed.
Click to expand it.
spec/features/projects/new_project_spec.rb
View file @
50d2d7f9
...
@@ -9,7 +9,7 @@ feature 'New project' do
...
@@ -9,7 +9,7 @@ feature 'New project' do
sign_in
(
user
)
sign_in
(
user
)
end
end
it
'shows "New project" page'
,
js:
true
do
it
'shows "New project" page'
,
:js
do
visit
new_project_path
visit
new_project_path
expect
(
page
).
to
have_content
(
'Project path'
)
expect
(
page
).
to
have_content
(
'Project path'
)
...
@@ -25,7 +25,7 @@ feature 'New project' do
...
@@ -25,7 +25,7 @@ feature 'New project' do
expect
(
page
).
to
have_link
(
'GitLab export'
)
expect
(
page
).
to
have_link
(
'GitLab export'
)
end
end
context
'Visibility level selector'
,
js:
true
do
context
'Visibility level selector'
,
:js
do
Gitlab
::
VisibilityLevel
.
options
.
each
do
|
key
,
level
|
Gitlab
::
VisibilityLevel
.
options
.
each
do
|
key
,
level
|
it
"sets selector to
#{
key
}
"
do
it
"sets selector to
#{
key
}
"
do
stub_application_setting
(
default_project_visibility:
level
)
stub_application_setting
(
default_project_visibility:
level
)
...
@@ -134,7 +134,7 @@ feature 'New project' do
...
@@ -134,7 +134,7 @@ feature 'New project' do
end
end
end
end
context
'Import project options'
,
js:
true
do
context
'Import project options'
,
:js
do
before
do
before
do
visit
new_project_path
visit
new_project_path
find
(
'#import-project-tab'
).
trigger
(
'click'
)
find
(
'#import-project-tab'
).
trigger
(
'click'
)
...
...
This diff is collapsed.
Click to expand it.
spec/features/projects_spec.rb
View file @
50d2d7f9
...
@@ -12,7 +12,7 @@ feature 'Project' do
...
@@ -12,7 +12,7 @@ feature 'Project' do
visit
new_project_path
visit
new_project_path
end
end
it
"allows creation from templates"
,
js:
true
do
it
"allows creation from templates"
,
:js
do
find
(
'#create-from-template-tab'
).
trigger
(
'click'
)
find
(
'#create-from-template-tab'
).
trigger
(
'click'
)
find
(
"#
#{
template
.
name
}
"
).
trigger
(
'click'
)
find
(
"#
#{
template
.
name
}
"
).
trigger
(
'click'
)
fill_in
(
"project_path"
,
with:
template
.
name
)
fill_in
(
"project_path"
,
with:
template
.
name
)
...
...
This diff is collapsed.
Click to expand it.
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