|
|
|
@ -1,7 +1,8 @@ |
|
|
|
|
require 'spec_helper' |
|
|
|
|
|
|
|
|
|
describe "Notification center navigation", type: :feature, js: true do |
|
|
|
|
shared_let(:project) { create :project } |
|
|
|
|
shared_association_default(:project) { create(:project) } |
|
|
|
|
|
|
|
|
|
shared_let(:work_package) { create :work_package, project: } |
|
|
|
|
shared_let(:second_work_package) { create :work_package, project: } |
|
|
|
|
shared_let(:recipient) do |
|
|
|
@ -77,4 +78,33 @@ describe "Notification center navigation", type: :feature, js: true do |
|
|
|
|
|
|
|
|
|
center.expect_item_selected notification |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context 'if the work package has a parent' do |
|
|
|
|
before do |
|
|
|
|
work_package.update! parent: second_work_package |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it 'can link to that parent from notifications (Regression #42984)' do |
|
|
|
|
visit "/notifications/details/#{work_package.id}" |
|
|
|
|
|
|
|
|
|
expect(page).to have_current_path "/notifications/details/#{work_package.id}/overview" |
|
|
|
|
|
|
|
|
|
split_screen.expect_open |
|
|
|
|
|
|
|
|
|
expect(page).to have_selector('[data-qa-selector="op-wp-breadcrumb-parent"]', text: second_work_package.subject) |
|
|
|
|
|
|
|
|
|
page.find('[data-qa-selector="op-wp-breadcrumb-parent"]').click |
|
|
|
|
|
|
|
|
|
expect(page).to have_current_path "/work_packages/#{second_work_package.id}/activity" |
|
|
|
|
|
|
|
|
|
# Works with another tab as well |
|
|
|
|
visit "/notifications/details/#{work_package.id}/relations" |
|
|
|
|
|
|
|
|
|
expect(page).to have_current_path "/notifications/details/#{work_package.id}/relations" |
|
|
|
|
|
|
|
|
|
page.find('[data-qa-selector="op-wp-breadcrumb-parent"]').click |
|
|
|
|
|
|
|
|
|
expect(page).to have_current_path "/work_packages/#{second_work_package.id}/relations" |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|