diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-14 03:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-14 03:09:30 +0300 |
commit | 8957ace3159e5369a700a77614493ed6a8a98f93 (patch) | |
tree | 98ff5be0caa30cfebb4e0cd0ae2ceaf21ce92eb4 /spec/features | |
parent | 232e0a31f1e5d5b3a788dfc3dba8f8d41df36bf9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/blobs/blob_show_spec.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb index 0ff3e45c956..9fc70412975 100644 --- a/spec/features/projects/blobs/blob_show_spec.rb +++ b/spec/features/projects/blobs/blob_show_spec.rb @@ -308,6 +308,48 @@ describe 'File blob', :js do end end + context 'Jupiter Notebook file' do + before do + project.add_maintainer(project.creator) + + Files::CreateService.new( + project, + project.creator, + start_branch: 'master', + branch_name: 'master', + commit_message: "Add Jupiter Notebook", + file_path: 'files/basic.ipynb', + file_content: project.repository.blob_at('add-ipython-files', 'files/ipython/basic.ipynb').data + ).execute + + visit_blob('files/basic.ipynb') + + wait_for_requests + end + + it 'displays the blob' do + aggregate_failures do + # shows rendered notebook + expect(page).to have_selector('.js-notebook-viewer-mounted') + + # does show a viewer switcher + expect(page).to have_selector('.js-blob-viewer-switcher') + + # show a disabled copy button + expect(page).to have_selector('.js-copy-blob-source-btn.disabled') + + # shows a raw button + expect(page).to have_link('Open raw') + + # shows a download button + expect(page).to have_link('Download') + + # shows the rendered notebook + expect(page).to have_content('test') + end + end + end + context 'ISO file (stored in LFS)' do context 'when LFS is enabled on the project' do before do |