Skip to content

Commit

Permalink
test second job app
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Nov 28, 2024
1 parent b65ab50 commit 7f40d0f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 7f40d0f

Please sign in to comment.