Commit 94ad0af7 authored by Stan Hu's avatar Stan Hu

Test that external images are preserved

parent b8452bf3
......@@ -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
......
......@@ -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/');
});
});
});
......
......@@ -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',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment