diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-11-06 14:33:42 +0000 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.m.gray@gmail.com> | 2018-11-06 14:33:42 +0000 |
commit | 31532b2d04e6647798cd3a6f72bcb40283341a9d (patch) | |
tree | 9c07313f2ca6de8bfe8321867ec5432413d8efff /spec/features/dashboard | |
parent | c8b6b9f243312262e5975185f4287f7fa666f717 (diff) | |
download | gitlab-ce-31532b2d04e6647798cd3a6f72bcb40283341a9d.tar.gz |
Resolve "Redesign activity feed"
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r-- | spec/features/dashboard/project_member_activity_index_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/features/dashboard/project_member_activity_index_spec.rb b/spec/features/dashboard/project_member_activity_index_spec.rb index 498775acff3..16919fe63ad 100644 --- a/spec/features/dashboard/project_member_activity_index_spec.rb +++ b/spec/features/dashboard/project_member_activity_index_spec.rb @@ -14,14 +14,15 @@ describe 'Project member activity', :js do wait_for_requests end - subject { page.find(".event-title").text } - context 'when a user joins the project' do before do visit_activities_and_wait_with_event(Event::JOINED) end - it { is_expected.to eq("#{user.name} joined project") } + it "presents the correct message" do + expect(page.find('.event-user-info').text).to eq("#{user.name} #{user.to_reference}") + expect(page.find('.event-title').text).to eq("joined project") + end end context 'when a user leaves the project' do @@ -29,7 +30,10 @@ describe 'Project member activity', :js do visit_activities_and_wait_with_event(Event::LEFT) end - it { is_expected.to eq("#{user.name} left project") } + it "presents the correct message" do + expect(page.find('.event-user-info').text).to eq("#{user.name} #{user.to_reference}") + expect(page.find('.event-title').text).to eq("left project") + end end context 'when a users membership expires for the project' do @@ -38,8 +42,8 @@ describe 'Project member activity', :js do end it "presents the correct message" do - message = "#{user.name} removed due to membership expiration from project" - is_expected.to eq(message) + expect(page.find('.event-user-info').text).to eq("#{user.name} #{user.to_reference}") + expect(page.find('.event-title').text).to eq("removed due to membership expiration from project") end end end |