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
756a696d
Commit
756a696d
authored
Feb 25, 2020
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for showing filenames with non-ASCII characters
parent
1546c2ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
spec/features/projects/tree/tree_show_spec.rb
spec/features/projects/tree/tree_show_spec.rb
+10
-0
spec/lib/gitlab/tree_summary_spec.rb
spec/lib/gitlab/tree_summary_spec.rb
+11
-0
No files found.
spec/features/projects/tree/tree_show_spec.rb
View file @
756a696d
...
@@ -37,6 +37,16 @@ describe 'Projects tree', :js do
...
@@ -37,6 +37,16 @@ describe 'Projects tree', :js do
expect
(
page
).
not_to
have_selector
(
'.flash-alert'
)
expect
(
page
).
not_to
have_selector
(
'.flash-alert'
)
end
end
it
'renders tree table with non-ASCII filenames without errors'
do
visit
project_tree_path
(
project
,
File
.
join
(
test_sha
,
'encoding'
))
wait_for_requests
expect
(
page
).
to
have_selector
(
'.tree-item'
)
expect
(
page
).
to
have_content
(
'Files, encoding and much more'
)
expect
(
page
).
to
have_content
(
'テスト.txt'
)
expect
(
page
).
not_to
have_selector
(
'.flash-alert'
)
end
context
'gravatar disabled'
do
context
'gravatar disabled'
do
let
(
:gravatar_enabled
)
{
false
}
let
(
:gravatar_enabled
)
{
false
}
...
...
spec/lib/gitlab/tree_summary_spec.rb
View file @
756a696d
...
@@ -129,6 +129,17 @@ describe Gitlab::TreeSummary do
...
@@ -129,6 +129,17 @@ describe Gitlab::TreeSummary do
expect
(
commits
).
to
satisfy_one
{
|
c
|
c
.
id
==
whitespace_commit_sha
}
expect
(
commits
).
to
satisfy_one
{
|
c
|
c
.
id
==
whitespace_commit_sha
}
end
end
end
end
context
'in a subdirectory with non-ASCII filenames'
do
let
(
:path
)
{
'encoding'
}
it
'returns commits for entries in the subdirectory'
do
entry
=
entries
.
find
{
|
x
|
x
[
:file_name
]
==
'テスト.txt'
}
expect
(
entry
).
to
be_a
(
Hash
)
expect
(
entry
).
to
include
(
:commit
)
end
end
end
end
describe
'#more?'
do
describe
'#more?'
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