From 7f40d0f9b762ba63f4d1fdad054f1f85294ab886 Mon Sep 17 00:00:00 2001 From: starswan Date: Thu, 28 Nov 2024 15:03:51 +0000 Subject: [PATCH] test second job app --- .../publishers_can_view_their_notifications_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/system/publishers/publishers_can_view_their_notifications_spec.rb b/spec/system/publishers/publishers_can_view_their_notifications_spec.rb index c1b44338be..777008bfa1 100644 --- a/spec/system/publishers/publishers_can_view_their_notifications_spec.rb +++ b/spec/system/publishers/publishers_can_view_their_notifications_spec.rb @@ -21,10 +21,12 @@ end context "when paginating" do + let(:job_application2) { create(:job_application, :status_submitted, vacancy: vacancy) } + before do stub_const("Publishers::NotificationsController::NOTIFICATIONS_PER_PAGE", 1) Publishers::JobApplicationReceivedNotifier.with(vacancy: vacancy, job_application: job_application).deliver(vacancy.publisher) - Publishers::JobApplicationReceivedNotifier.with(vacancy: vacancy, job_application: job_application).deliver(vacancy.publisher) + Publishers::JobApplicationReceivedNotifier.with(vacancy: vacancy, job_application: job_application2).deliver(vacancy.publisher) visit root_path end @@ -33,12 +35,13 @@ click_on strip_tags(I18n.t("nav.notifications_html", count: 2)) + # sleep 60 within first(".notification") do expect(page).to have_css("div", class: "notification__tag", text: "new", count: 1) end click_on "Next" - sleep 10 + # sleep 100 find(".govuk-pagination__prev") within first(".notification") do