Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
968 B
Ruby
Raw Permalink Normal View History

2024-06-19 13:14:21 +02:00
# frozen_string_literal: true
require "rails_helper"
RSpec.describe WorkPackages::SplitViewComponent, type: :component do
2024-08-09 15:15:38 +02:00
include OpenProject::StaticRouting::UrlHelpers
let(:project) { create(:project) }
let(:work_package) { create(:work_package, project:) }
subject do
2024-08-12 21:47:05 +02:00
with_controller_class(NotificationsController) do
with_request_url("/notifications/details/:work_package_id") do
render_inline(described_class.new(id: work_package.id, base_route: notifications_path))
end
2024-08-09 15:15:38 +02:00
end
end
before do
allow(WorkPackage).to receive(:visible).and_return(WorkPackage.where(id: work_package.id))
end
it "renders successfully" do
subject
expect(page).to have_text("Overview")
expect(page).to have_test_selector("wp-details-tab-component--tabs")
expect(page).to have_test_selector("wp-details-tab-component--close")
expect(page).to have_test_selector("wp-details-tab-component--full-screen")
end
2024-06-19 13:14:21 +02:00
end