diff --git a/assets/javascripts/discourse/components/upcoming-events-list.gjs b/assets/javascripts/discourse/components/upcoming-events-list.gjs index bcf6747a1..b43b9e061 100644 --- a/assets/javascripts/discourse/components/upcoming-events-list.gjs +++ b/assets/javascripts/discourse/components/upcoming-events-list.gjs @@ -71,7 +71,7 @@ export default class UpcomingEventsList extends Component { const categorySlug = this.router.currentRoute.attributes?.category?.slug; const titleSetting = this.siteSettings?.map_events_title; - if (titleSetting == "") { + if (titleSetting === "") { return I18n.t("discourse_post_event.upcoming_events_list.title"); } diff --git a/test/javascripts/integration/components/upcoming-events-list-test.gjs b/test/javascripts/integration/components/upcoming-events-list-test.gjs index e12e36cf6..06fb61268 100644 --- a/test/javascripts/integration/components/upcoming-events-list-test.gjs +++ b/test/javascripts/integration/components/upcoming-events-list-test.gjs @@ -163,32 +163,6 @@ module("Integration | Component | upcoming-events-list", function (hooks) { ); }); - test("with events, overridden titles", async function (assert) { - // this.siteSettings.map_events_title = - // '[{"category_slug": "announcements", "custom_title": "Upcoming Announcements"}]'; - // await render(); - // this.appEvents.trigger("page:changed", { url: "/c/1" }); - // debugger; - // // this.args.params.categorySlug = "announcements"; - // assert.strictEqual( - // query(".upcoming-events-list__heading").innerText, - // "Upcoming Announcements", - // "it sets 'Upcoming Announcements' as the title in 'c/announcements'" - // ); - // this.args.params.categorySlug = "events"; - // assert.equal( - // component.title(), - // "Upcoming Cool Events", - // "it sets 'Upcoming Cool Events' as the title in 'c/events'" - // ); - // this.args.params.categorySlug = "unknown"; - // assert.equal( - // component.title(), - // "Upcoming Events", - // "it returns the default value for title when otherwise not specified" - // ); - }); - test("with events, view-all navigation", async function (assert) { pretender.get("/discourse-post-event/events", twoEventsResponseHandler);