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
94ad0af7
Commit
94ad0af7
authored
Apr 16, 2021
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that external images are preserved
parent
b8452bf3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
spec/frontend/fixtures/raw.rb
spec/frontend/fixtures/raw.rb
+1
-1
spec/frontend/notebook/cells/markdown_spec.js
spec/frontend/notebook/cells/markdown_spec.js
+7
-2
spec/support/helpers/test_env.rb
spec/support/helpers/test_env.rb
+1
-1
No files found.
spec/frontend/fixtures/raw.rb
View file @
94ad0af7
...
...
@@ -26,7 +26,7 @@ RSpec.describe 'Raw files', '(JavaScript fixtures)' do
end
it
'blob/notebook/markdown-table.json'
do
@blob
=
project
.
repository
.
blob_at
(
'
b0316785
'
,
'files/ipython/markdown-table.ipynb'
)
@blob
=
project
.
repository
.
blob_at
(
'
f6b7a707
'
,
'files/ipython/markdown-table.ipynb'
)
end
it
'blob/notebook/worksheets.json'
do
...
...
spec/frontend/notebook/cells/markdown_spec.js
View file @
94ad0af7
...
...
@@ -65,18 +65,23 @@ describe('Markdown component', () => {
return
vm
.
$nextTick
().
then
(()
=>
{
const
images
=
vm
.
$el
.
querySelectorAll
(
'
img
'
);
expect
(
images
.
length
).
toBe
(
3
);
expect
(
images
.
length
).
toBe
(
5
);
const
columns
=
vm
.
$el
.
querySelectorAll
(
'
td
'
);
expect
(
images
.
length
).
toBe
(
3
);
expect
(
columns
.
length
).
toBe
(
6
);
expect
(
columns
[
0
].
textContent
).
toEqual
(
'
Hello
'
);
expect
(
columns
[
1
].
textContent
).
toEqual
(
'
Test
'
);
expect
(
columns
[
2
].
textContent
).
toEqual
(
'
World
'
);
expect
(
columns
[
3
].
textContent
).
toEqual
(
'
Fake
'
);
expect
(
columns
[
4
].
textContent
).
toEqual
(
'
External image:
'
);
expect
(
columns
[
5
].
textContent
).
toEqual
(
'
Empty
'
);
expect
(
columns
[
0
].
innerHTML
).
toContain
(
'
<img src="data:image/jpeg;base64
'
);
expect
(
columns
[
1
].
innerHTML
).
toContain
(
'
<img src="data:image/png;base64
'
);
expect
(
columns
[
2
].
innerHTML
).
toContain
(
'
<img src="data:image/jpeg;base64
'
);
expect
(
columns
[
3
].
innerHTML
).
toContain
(
'
<img>
'
);
expect
(
columns
[
4
].
innerHTML
).
toContain
(
'
<img src="https://www.google.com/
'
);
});
});
});
...
...
spec/support/helpers/test_env.rb
View file @
94ad0af7
...
...
@@ -52,7 +52,7 @@ module TestEnv
'wip'
=>
'b9238ee'
,
'csv'
=>
'3dd0896'
,
'v1.1.0'
=>
'b83d6e3'
,
'add-ipython-files'
=>
'
b031678
'
,
'add-ipython-files'
=>
'
f6b7a70
'
,
'add-pdf-file'
=>
'e774ebd'
,
'squash-large-files'
=>
'54cec52'
,
'add-pdf-text-binary'
=>
'79faa7b'
,
...
...
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