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
f0603e4c
Commit
f0603e4c
authored
Jul 20, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added spec, fixed wording
parent
4eb9045d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+3
-3
spec/features/projects/import_export/import_file_spec.rb
spec/features/projects/import_export/import_file_spec.rb
+13
-0
No files found.
app/views/projects/new.html.haml
View file @
f0603e4c
...
@@ -136,12 +136,12 @@
...
@@ -136,12 +136,12 @@
});
});
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
true
)
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
true
)
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
'
Project path required.
'
);
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
'
Project path
and name
required.
'
);
$
(
'
.import_gitlab_project
'
).
click
(
function
(
event
)
{
$
(
'
.import_gitlab_project
'
).
click
(
function
(
event
)
{
if
(
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
))
{
if
(
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
))
{
event
.
preventDefault
();
event
.
preventDefault
();
new
Flash
(
"
Please enter
a path
for the project to be imported to.
"
);
new
Flash
(
"
Please enter
path and name
for the project to be imported to.
"
);
}
}
});
});
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
$
(
"
.flash-container
"
).
html
(
""
)
$
(
"
.flash-container
"
).
html
(
""
)
}
else
{
}
else
{
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
true
);
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
true
);
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
'
Project path required.
'
);
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
'
Project path
and name
required.
'
);
}
}
});
});
...
...
spec/features/projects/import_export/import_file_spec.rb
View file @
f0603e4c
...
@@ -59,6 +59,19 @@ feature 'project import', feature: true, js: true do
...
@@ -59,6 +59,19 @@ feature 'project import', feature: true, js: true do
end
end
end
end
scenario
'project with no name'
do
project
=
create
(
:project
,
namespace_id:
2
)
visit
new_project_path
select2
(
'2'
,
from:
'#project_namespace_id'
)
click_link
'GitLab export'
page
.
within
(
'.flash-container'
)
do
expect
(
page
).
to
have_content
(
'Please enter path and name'
)
end
end
def
wiki_exists?
def
wiki_exists?
wiki
=
ProjectWiki
.
new
(
project
)
wiki
=
ProjectWiki
.
new
(
project
)
File
.
exist?
(
wiki
.
repository
.
path_to_repo
)
&&
!
wiki
.
repository
.
empty?
File
.
exist?
(
wiki
.
repository
.
path_to_repo
)
&&
!
wiki
.
repository
.
empty?
...
...
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