diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-16 18:18:52 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-30 15:01:26 +0200 |
commit | f1d3ea63cf74d2791a9a863b29ab2d919ea61bd0 (patch) | |
tree | c36c2b272fba917af321a4f16c34a5047407f3b2 /spec/features/snippets | |
parent | b4c4b48a8c0258ff266c523488aa169a1b5ea0f3 (diff) | |
download | gitlab-ce-f1d3ea63cf74d2791a9a863b29ab2d919ea61bd0.tar.gz |
Show the status of a user in interactions
The status is shown for
- The author of a commit when viewing a commit
- Notes on a commit (regular/diff)
- The user that triggered a pipeline when viewing a pipeline
- The author of a merge request when viewing a merge request
- The author of notes on a merge request (regular/diff)
- The author of an issue when viewing an issue
- The author of notes on an issue
- The author of a snippet when viewing a snippet
- The author of notes on a snippet
- A user's profile page
- The list of members of a group/user
Diffstat (limited to 'spec/features/snippets')
-rw-r--r-- | spec/features/snippets/notes_on_personal_snippets_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/snippets/show_spec.rb | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/snippets/notes_on_personal_snippets_spec.rb b/spec/features/snippets/notes_on_personal_snippets_spec.rb index 269351e55c9..1442e011d52 100644 --- a/spec/features/snippets/notes_on_personal_snippets_spec.rb +++ b/spec/features/snippets/notes_on_personal_snippets_spec.rb @@ -16,6 +16,8 @@ describe 'Comments on personal snippets', :js do before do sign_in user visit snippet_path(snippet) + + wait_for_requests end subject { page } @@ -42,6 +44,15 @@ describe 'Comments on personal snippets', :js do expect(page).to have_selector('.note-emoji-button') end end + + it 'shows the status of a note author' do + status = create(:user_status, user: user) + visit snippet_path(snippet) + + within("#note_#{snippet_notes[0].id}") do + expect(page).to show_user_status(status) + end + end end context 'when submitting a note' do diff --git a/spec/features/snippets/show_spec.rb b/spec/features/snippets/show_spec.rb index f31457db92f..3fe0b60b18f 100644 --- a/spec/features/snippets/show_spec.rb +++ b/spec/features/snippets/show_spec.rb @@ -155,4 +155,12 @@ describe 'Snippet', :js do end end end + + it_behaves_like 'showing user status' do + let(:file_name) { 'popen.rb' } + let(:content) { project.repository.blob_at('master', 'files/ruby/popen.rb').data } + let(:user_with_status) { snippet.author } + + subject { visit snippet_path(snippet) } + end end |