Skip to content

Commit

Permalink
change create time of job application
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Nov 28, 2024
1 parent 7f40d0f commit 43b390f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

context "when paginating" do
let(:job_application2) { create(:job_application, :status_submitted, vacancy: vacancy) }
let(:job_application2) { create(:job_application, :status_submitted, vacancy: vacancy, created_at: 1.minute.ago) }

before do
stub_const("Publishers::NotificationsController::NOTIFICATIONS_PER_PAGE", 1)
Expand All @@ -35,23 +35,23 @@

click_on strip_tags(I18n.t("nav.notifications_html", count: 2))

# sleep 60
within first(".notification") do
sleep 10
within ".notification" do
expect(page).to have_css("div", class: "notification__tag", text: "new", count: 1)
end

click_on "Next"
# sleep 100
find(".govuk-pagination__prev")

within first(".notification") do
sleep 10
within ".notification" do
expect(page).to have_css("div", class: "notification__tag", text: "new", count: 1)
end

click_on "Previous"
find(".govuk-pagination__next")

within first(".notification") do
within ".notification" do
expect(page).not_to have_css("div", class: "notification__tag", text: "new", count: 1)
end
end
Expand Down

0 comments on commit 43b390f

Please sign in to comment.