Skip to content

Commit

Permalink
Fix up to system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leenagupte committed Sep 24, 2024
1 parent 1730332 commit 18b9c3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/system/travel_advice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@
it "displays latest updates" do
visit @base_path

expect(page).to have_css("h1", text: @content_item["details"]["parts"].first["title"])
expect(page).to have_css("h1", text: @content_store_response["details"]["parts"].first["title"])
expect(page).to have_text("The main opposition party has called for mass protests against the government in Tirana on 18 February 2017.")

expect(page).to have_content(I18n.t("formats.travel_advice.still_current_at"))
expect(page).to have_content(Time.zone.today.strftime("%-d %B %Y"))

expect(page).to have_content(I18n.t("formats.travel_advice.updated"))
expect(page).to have_content(Date.parse(@content_item.reviewed_at).strftime("%-d %B %Y"))
expect(page).to have_content(Date.parse(@content_store_response["details"]["reviewed_at"]).strftime("%-d %B %Y"))

within ".gem-c-metadata" do
expect(page).to have_content(@content_item["details"]["change_description"].gsub("Latest update: ", "").strip)
expect(page).to have_content(@content_store_response["details"]["change_description"].gsub("Latest update: ", "").strip)
end
end

Expand Down

0 comments on commit 18b9c3b

Please sign in to comment.