diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-11 00:55:02 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-11 00:55:02 +0100 |
commit | 3f73bdd837f9803b75eca484a0a0615db6c58c80 (patch) | |
tree | 0bd2c99d9198bfa22e7a29f375131f940033da7b /spec/features/projects/snippets_spec.rb | |
parent | b594ab949d1a2ceb9d949ff2641679fbdf273452 (diff) | |
parent | 37a5632483b67ddcfa4c535cc911319b25f01fb5 (diff) | |
download | gitlab-ce-xterm-npm.tar.gz |
Merge branch 'master' into xterm-npmxterm-npm
Diffstat (limited to 'spec/features/projects/snippets_spec.rb')
-rw-r--r-- | spec/features/projects/snippets_spec.rb | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/spec/features/projects/snippets_spec.rb b/spec/features/projects/snippets_spec.rb deleted file mode 100644 index 0fa7ca9afd4..00000000000 --- a/spec/features/projects/snippets_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'spec_helper' - -describe 'Project snippets', :js do - context 'when the project has snippets' do - let(:project) { create(:project, :public) } - let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) } - let!(:other_snippet) { create(:project_snippet) } - - context 'pagination' do - before do - allow(Snippet).to receive(:default_per_page).and_return(1) - - visit project_snippets_path(project) - end - - it_behaves_like 'paginated snippets' - end - - context 'list content' do - it 'contains all project snippets' do - visit project_snippets_path(project) - - expect(page).to have_selector('.snippet-row', count: 2) - - expect(page).to have_content(snippets[0].title) - expect(page).to have_content(snippets[1].title) - end - end - - context 'when submitting a note' do - before do - sign_in(create(:admin)) - visit project_snippet_path(project, snippets[0]) - end - - it 'should have autocomplete' do - find('#note_note').native.send_keys('') - fill_in 'note[note]', with: '@' - - expect(page).to have_selector('.atwho-view') - end - - it 'should have zen mode' do - find('.js-zen-enter').click() - expect(page).to have_selector('.fullscreen') - end - end - end -end |