A platform for community discussion. Free, open, simple.
DEV: Stabilize event card system test (#41638)
Alan Guo Xiang Tanee17713ce067
diff --git a/plugins/discourse-calendar/spec/system/event_card_spec.rb b/plugins/discourse-calendar/spec/system/event_card_spec.rbindex 2ba3ae68e11..821bf75afbd 100644--- a/plugins/discourse-calendar/spec/system/event_card_spec.rb+++ b/plugins/discourse-calendar/spec/system/event_card_spec.rb@@ -14,20 +14,25 @@ describe "Event card" dosign_in(admin)end- it "links the hero image to the topic" do+ it "links the hero image to the topic", time: Time.zone.parse("2026-07-13 12:00:00") dopost =PostCreator.create!(admin,title: "Boat party with a banner",category: category.id,- raw: "[event start=\"#{2.hours.from_now.iso8601}\"]\n[/event]",+ raw:+ "[event start=\"#{2.hours.from_now.iso8601}\" end=\"#{3.hours.from_now.iso8601}\"]\n[/event]",)DiscoursePostEvent::Event.find(post.id).update!(image_upload: upload)category_page.visit(category)expect(page).to have_css("#category-events-calendar .fc")- find(".fc-daygrid-event-harness .fc-event-title", text: "Boat party with a banner").click+ find(+ ".fc-daygrid-event-harness .fc-event-title",+ text: "Boat party with a banner",+ match: :first,+ ).clickexpect(page).to have_css(".discourse-post-event .event-image img")# the hero image links to the topic, not to the upload file (lightbox)