DEV: Update linting (#704)

This commit is contained in:
Jarek Radosz 2025-03-17 11:55:49 +01:00 committed by GitHub
parent c8934ed60d
commit fc3f4071ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 1332 additions and 1421 deletions

View File

@ -1,7 +1,7 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (8.0.0) activesupport (8.0.2)
base64 base64
benchmark (>= 0.3) benchmark (>= 0.3)
bigdecimal bigdecimal
@ -17,67 +17,77 @@ GEM
ast (2.4.2) ast (2.4.2)
base64 (0.2.0) base64 (0.2.0)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.1.8) bigdecimal (3.1.9)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.5)
connection_pool (2.4.1) connection_pool (2.5.0)
drb (2.2.1) drb (2.2.1)
i18n (1.14.6) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.8.2) json (2.10.2)
language_server-protocol (3.17.0.3) language_server-protocol (3.17.0.4)
logger (1.6.1) lint_roller (1.1.0)
minitest (5.25.1) logger (1.6.6)
minitest (5.25.5)
parallel (1.26.3) parallel (1.26.3)
parser (3.3.6.0) parser (3.3.7.1)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
prettier_print (1.2.1) prettier_print (1.2.1)
racc (1.8.1) racc (1.8.1)
rack (3.1.10) rack (3.1.12)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.9.2) regexp_parser (2.10.0)
rubocop (1.68.0) rubocop (1.74.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0) regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0) rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.1) rubocop-ast (1.38.1)
parser (>= 3.3.1.0) parser (>= 3.3.1.0)
rubocop-capybara (2.21.0) rubocop-capybara (2.22.1)
rubocop (~> 1.41) lint_roller (~> 1.1)
rubocop-discourse (3.8.6) rubocop (~> 1.72, >= 1.72.1)
rubocop-discourse (3.12.1)
activesupport (>= 6.1) activesupport (>= 6.1)
rubocop (>= 1.59.0) lint_roller (>= 1.1.0)
rubocop-capybara (>= 2.0.0) rubocop (>= 1.73.2)
rubocop-factory_bot (>= 2.0.0) rubocop-capybara (>= 2.22.0)
rubocop-rails (>= 2.25.0) rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1) rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.30.0) rubocop-rspec_rails (>= 2.31.0)
rubocop-factory_bot (2.26.1) rubocop-factory_bot (2.27.1)
rubocop (~> 1.61) lint_roller (~> 1.1)
rubocop-rails (2.27.0) rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0) rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.2.0) rubocop-rspec (3.5.0)
rubocop (~> 1.61) lint_roller (~> 1.1)
rubocop-rspec_rails (2.30.0) rubocop (~> 1.72, >= 1.72.1)
rubocop (~> 1.61) rubocop-rspec_rails (2.31.0)
rubocop-rspec (~> 3, >= 3.0.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
securerandom (0.3.2) securerandom (0.4.1)
syntax_tree (6.2.0) syntax_tree (6.2.0)
prettier_print (>= 1.2.0) prettier_print (>= 1.2.0)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0) unicode-display_width (3.1.4)
uri (1.0.2) unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
PLATFORMS PLATFORMS
ruby ruby
@ -87,4 +97,4 @@ DEPENDENCIES
syntax_tree syntax_tree
BUNDLED WITH BUNDLED WITH
2.5.18 2.6.5

View File

@ -15,7 +15,9 @@ import MoreMenu from "./more-menu";
import Status from "./status"; import Status from "./status";
import Url from "./url"; import Url from "./url";
const StatusSeparator = <template><span class="separator">·</span></template>; const StatusSeparator = <template>
<span class="separator">·</span>
</template>;
const InfoSection = <template> const InfoSection = <template>
<section class="event__section" ...attributes> <section class="event__section" ...attributes>

View File

@ -0,0 +1,50 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import { i18n } from "discourse-i18n";
import RegionInput from "../../components/region-input";
import { TIME_ZONE_TO_REGION } from "../../lib/regions";
export default class Region extends Component {
static shouldRender(args, component) {
return component.siteSettings.calendar_enabled;
}
@service siteSettings;
@action
onChange(value) {
this.args.outletArgs.model.set("custom_fields.holidays-region", value);
}
@action
useCurrentRegion() {
this.args.outletArgs.model.set(
"custom_fields.holidays-region",
TIME_ZONE_TO_REGION[moment.tz.guess()] || "us"
);
}
<template>
<div class="control-group region">
<label class="control-label">
{{i18n "discourse_calendar.region.title"}}
</label>
<div class="controls">
<RegionInput
@value={{@outletArgs.model.custom_fields.holidays-region}}
@allowNoneRegion={{true}}
@onChange={{this.onChange}}
/>
</div>
<DButton
@icon="globe"
@label="discourse_calendar.region.use_current_region"
@action={{this.useCurrentRegion}}
/>
</div>
</template>
}

View File

@ -1,17 +0,0 @@
<div class="control-group">
<label class="control-label">{{i18n
"discourse_calendar.region.title"
}}</label>
<div class="controls">
<RegionInput
@value={{this.model.custom_fields.holidays-region}}
@allowNoneRegion={{true}}
@onChange={{action "onChange"}}
/>
</div>
<DButton
@icon="globe"
@label="discourse_calendar.region.use_current_region"
@action={{action "useCurrentRegion"}}
/>
</div>

View File

@ -1,25 +0,0 @@
import { action } from "@ember/object";
import { TIME_ZONE_TO_REGION } from "../../lib/regions";
export default {
setupComponent(args, component) {
component.setProperties({
@action
onChange(value) {
this.model.set("custom_fields.holidays-region", value);
},
@action
useCurrentRegion() {
this.model.set(
"custom_fields.holidays-region",
TIME_ZONE_TO_REGION[moment.tz.guess()] || "us"
);
},
});
},
shouldRender(args, component) {
return component.siteSettings.calendar_enabled;
},
};

View File

@ -992,8 +992,8 @@ function initializeDiscourseCalendar(api) {
http://www.google.com/calendar/event?action=TEMPLATE&text=${encodeURIComponent( http://www.google.com/calendar/event?action=TEMPLATE&text=${encodeURIComponent(
eventTitle eventTitle
)}&dates=${startDate}/${endDate}&details=${encodeURIComponent( )}&dates=${startDate}/${endDate}&details=${encodeURIComponent(
event.eventRange.def.extendedProps.description event.eventRange.def.extendedProps.description
)}`; )}`;
link.target = "_blank"; link.target = "_blank";
link.classList.add("fc-list-item-add-to-calendar"); link.classList.add("fc-list-item-add-to-calendar");
event.el.querySelector(".fc-list-item-title").appendChild(link); event.el.querySelector(".fc-list-item-title").appendChild(link);

View File

@ -98,9 +98,10 @@ function initializeDiscoursePostEventDecorator(api) {
const event = DiscoursePostEventEvent.create(post.event); const event = DiscoursePostEventEvent.create(post.event);
helper.renderGlimmer(wrapper, <template> helper.renderGlimmer(
<DiscoursePostEvent @event={{event}} /> wrapper,
</template>); <template><DiscoursePostEvent @event={{event}} /></template>
);
} }
}, },
{ {

View File

@ -1,14 +1,16 @@
@use "sass:color";
:root { :root {
--calendar-normal: #{dark-light-choose( --calendar-normal: #{dark-light-choose(
lighten($tertiary, 55%), color.adjust($tertiary, $lightness: 55%),
darken($tertiary, 25%) color.adjust($tertiary, $lightness: -25%)
)}; )};
--calendar-close-to-working-hours: #{dark-light-choose( --calendar-close-to-working-hours: #{dark-light-choose(
desaturate(lighten($tertiary, 45%), 15%), color.adjust(color.adjust($tertiary, $lightness: 45%), $saturation: -15%),
darken($tertiary, 15%) color.adjust($tertiary, $lightness: -15%)
)}; )};
--calendar-in-working-hours: #{dark-light-choose( --calendar-in-working-hours: #{dark-light-choose(
desaturate(lighten($tertiary, 40%), 20%), color.adjust(color.adjust($tertiary, $lightness: 40%), $saturation: -20%),
darken($tertiary, 10%) color.adjust($tertiary, $lightness: -10%)
)}; )};
} }

View File

@ -30,7 +30,6 @@
} }
} }
} }
overflow: hidden; overflow: hidden;
.fc-scroller { .fc-scroller {
@ -152,6 +151,7 @@
margin-left: 0; margin-left: 0;
} }
} }
.fc-list-item-add-to-calendar { .fc-list-item-add-to-calendar {
color: var(--tertiary); color: var(--tertiary);
font-size: var(--font-down-1); font-size: var(--font-down-1);
@ -178,7 +178,9 @@ a.holiday {
min-height: 60px; min-height: 60px;
.discourse-calendar-timezone-picker { .discourse-calendar-timezone-picker {
font-size: 16px;
margin-bottom: 0; margin-bottom: 0;
max-width: 50vw;
} }
h2.discourse-calendar-title { h2.discourse-calendar-title {
@ -191,11 +193,6 @@ a.holiday {
} }
} }
.discourse-calendar-header .discourse-calendar-timezone-picker {
max-width: 50vw;
font-size: 16px;
}
.group-timezones { .group-timezones {
display: grid; display: grid;
width: 100%; width: 100%;
@ -257,6 +254,7 @@ a.holiday {
position: relative; position: relative;
margin: 0.25em 0; margin: 0.25em 0;
margin-right: 0.5em; margin-right: 0.5em;
&::before { &::before {
display: block; display: block;
content: ""; content: "";
@ -275,8 +273,7 @@ a.holiday {
display: flex; display: flex;
width: 120px; width: 120px;
padding: 0.25em; padding: 0.25em;
-webkit-appearance: none; appearance: none;
-moz-appearance: none;
cursor: pointer; cursor: pointer;
font: inherit; font: inherit;
outline: none; outline: none;
@ -379,6 +376,7 @@ a.holiday {
opacity: 0.7; opacity: 0.7;
position: relative; position: relative;
} }
&.on-holiday::after { &.on-holiday::after {
content: "📅"; content: "📅";
position: absolute; position: absolute;
@ -412,7 +410,7 @@ a.holiday {
box-shadow: var(--shadow-dropdown); box-shadow: var(--shadow-dropdown);
border-radius: 4px; border-radius: 4px;
padding: 0.5em; padding: 0.5em;
max-width: unquote("min(75vw, 400px)"); max-width: min(75vw, 400px);
[data-popper-arrow], [data-popper-arrow],
[data-popper-arrow]::before { [data-popper-arrow]::before {

View File

@ -33,8 +33,6 @@
.bulk-invite-actions { .bulk-invite-actions {
display: flex; display: flex;
.send-bulk-invites {
}
.add-bulk-invite { .add-bulk-invite {
margin-left: auto; margin-left: auto;

View File

@ -4,6 +4,13 @@
.topic-link { .topic-link {
display: inline; display: inline;
} }
.event-date {
font-size: var(--font-down-4);
color: var(--primary-medium);
font-weight: normal;
padding: 0.25em;
}
} }
.main-link { .main-link {
@ -36,12 +43,3 @@
} }
} }
} }
.header-title {
.event-date {
font-size: var(--font-down-4);
color: var(--primary-medium);
font-weight: normal;
padding: 0.25em;
}
}

View File

@ -2,27 +2,33 @@
.modal-body { .modal-body {
padding: 0; padding: 0;
} }
.modal-inner-container { .modal-inner-container {
min-width: 350px; min-width: 350px;
} }
.loading-container { .loading-container {
height: 40vh; height: 40vh;
overflow-y: scroll; overflow-y: scroll;
.no-users { .no-users {
text-align: center; text-align: center;
font-size: var(--font-up-1); font-size: var(--font-up-1);
} }
} }
.invitees-type-filter { .invitees-type-filter {
margin-bottom: 9px; margin-bottom: 9px;
display: flex; display: flex;
.btn { .btn {
width: calc(100% / 3); width: calc(100% / 3);
margin: 0; margin: 0;
border-radius: 0px; border-radius: 0;
padding: 0.75em 0em; padding: 0.75em 0;
} }
} }
.filter { .filter {
width: calc(100% - 2em); width: calc(100% - 2em);
margin-bottom: 1em; margin-bottom: 1em;
@ -52,6 +58,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
white-space: nowrap; white-space: nowrap;
.username { .username {
margin-left: 0.5em; margin-left: 0.5em;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -1,5 +1,6 @@
.discourse-post-event-upcoming-events { .discourse-post-event-upcoming-events {
height: 100%; height: 100%;
.upcoming-events-table { .upcoming-events-table {
width: 100%; width: 100%;

View File

@ -371,32 +371,7 @@ $show-interested: inherit;
@include ellipsis; @include ellipsis;
} }
} }
}
.event-dates {
// hardcoded as cooking date is async and will change height after initial rendering otherwise
// not ideal but a decent low tech solution
height: 24px;
.participants {
margin-left: 0.5em;
color: var(--primary-medium);
}
.discourse-local-date {
.d-icon {
display: none;
}
}
.separator {
color: var(--primary-high);
margin: 0 0.5em;
text-align: center;
}
}
.discourse-post-event {
.cooked-date, .cooked-date,
.participants, .participants,
.event-url .url { .event-url .url {
@ -438,3 +413,26 @@ $show-interested: inherit;
color: var(--primary-medium); color: var(--primary-medium);
} }
} }
.event-dates {
// hardcoded as cooking date is async and will change height after initial rendering otherwise
// not ideal but a decent low tech solution
height: 24px;
.participants {
margin-left: 0.5em;
color: var(--primary-medium);
}
.discourse-local-date {
.d-icon {
display: none;
}
}
.separator {
color: var(--primary-high);
margin: 0 0.5em;
text-align: center;
}
}

View File

@ -65,6 +65,7 @@
.combo-box { .combo-box {
width: 130px; width: 130px;
} }
.selected-name { .selected-name {
border: 0; border: 0;

View File

@ -51,7 +51,6 @@
color: var(--primary); color: var(--primary);
text-shadow: none; text-shadow: none;
border: none; border: none;
padding: 6px 12px; padding: 6px 12px;
&:hover { &:hover {
@ -63,12 +62,12 @@
background: var(--tertiary); background: var(--tertiary);
color: var(--secondary); color: var(--secondary);
} }
margin: 0.3em 0 0.3em 0.5em; margin: 0.3em 0 0.3em 0.5em;
} }
.fc-button-group { .fc-button-group {
margin: 0.3em 0 0.3em 0.5em; margin: 0.3em 0 0.3em 0.5em;
// margin-right: 0; // margin-right: 0;
.fc-button { .fc-button {
margin: 0; margin: 0;
@ -107,7 +106,6 @@
} }
&.grouped-event { &.grouped-event {
background-color: none;
background: var(--secondary); background: var(--secondary);
border: 1px solid var(--primary-low-mid); border: 1px solid var(--primary-low-mid);
color: var(--primary); color: var(--primary);

View File

@ -5,12 +5,15 @@
padding: 0.5em; padding: 0.5em;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
} }
&__event:last-of-type { &__event:last-of-type {
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
&__event:hover { &__event:hover {
background-color: var(--primary-50); background-color: var(--primary-50);
} }
&__event-date { &__event-date {
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
@ -25,22 +28,26 @@
flex-direction: column; flex-direction: column;
background-color: var(--secondary); background-color: var(--secondary);
} }
&__event-date .month { &__event-date .month {
text-align: center; text-align: center;
color: var(--primary); color: var(--primary);
font-size: var(--font-down-3); font-size: var(--font-down-3);
text-transform: uppercase; text-transform: uppercase;
} }
&__event-date .day { &__event-date .day {
text-align: center; text-align: center;
color: var(--primary); color: var(--primary);
font-weight: bold; font-weight: bold;
font-size: var(--font-down-1); font-size: var(--font-down-1);
} }
&__event-content { &__event-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
&__event-name { &__event-name {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
@ -48,20 +55,24 @@
overflow: hidden; overflow: hidden;
color: var(--primary); color: var(--primary);
} }
&__event-time { &__event-time {
font-size: var(--font-down-2); font-size: var(--font-down-2);
font-weight: 400; font-weight: 400;
color: var(--primary-700); color: var(--primary-700);
} }
&__footer { &__footer {
margin-top: 1em; margin-top: 1em;
font-size: var(--font-down-2); font-size: var(--font-down-2);
line-height: var(--line-height-medium); line-height: var(--line-height-medium);
padding-left: 0.5em; padding-left: 0.5em;
} }
&__footer a { &__footer a {
color: var(--primary-high); color: var(--primary-high);
} }
&__footer a:hover { &__footer a:hover {
color: var(--primary); color: var(--primary);
} }

View File

@ -2,10 +2,12 @@
table { table {
width: 100%; width: 100%;
} }
.fc-list-item-add-to-calendar { .fc-list-item-add-to-calendar {
float: right; float: right;
margin-right: 5px; margin-right: 5px;
} }
.fc-list-item:hover td { .fc-list-item:hover td {
background: var(--highlight-medium); background: var(--highlight-medium);
} }

View File

@ -23,6 +23,7 @@
.fc-day-header.fc-widget-header { .fc-day-header.fc-widget-header {
text-align: center; text-align: center;
padding: 0.25em; padding: 0.25em;
span { span {
font-size: var(--font-down-1); font-size: var(--font-down-1);
text-align: center; text-align: center;
@ -33,9 +34,11 @@
.calendar { .calendar {
padding: 0; padding: 0;
.fc-list-item-add-to-calendar { .fc-list-item-add-to-calendar {
display: block; display: block;
} }
&.fc-unthemed .fc-header-toolbar { &.fc-unthemed .fc-header-toolbar {
padding: 0.5em 0; padding: 0.5em 0;
} }

View File

@ -1,3 +1,8 @@
import DiscourseRecommended from "@discourse/lint-configs/eslint"; import DiscourseRecommended from "@discourse/lint-configs/eslint";
export default [...DiscourseRecommended]; export default [
...DiscourseRecommended,
{
ignores: ["public/**/*"],
},
];

View File

@ -1,10 +1,11 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "2.4.0", "@discourse/lint-configs": "2.11.0",
"ember-template-lint": "6.1.0", "ember-template-lint": "7.0.1",
"eslint": "9.19.0", "eslint": "9.22.0",
"prettier": "2.8.8" "prettier": "3.5.3",
"stylelint": "16.15.0"
}, },
"engines": { "engines": {
"node": ">= 22", "node": ">= 22",

View File

@ -335,7 +335,7 @@ after_initialize do
return if self.is_first_post? return if self.is_first_post?
# Skip if not a calendar topic # Skip if not a calendar topic
return if !self&.topic&.first_post&.custom_fields&.[](DiscourseCalendar::CALENDAR_CUSTOM_FIELD) return if !self.topic&.first_post&.custom_fields&.[](DiscourseCalendar::CALENDAR_CUSTOM_FIELD)
validator = DiscourseCalendar::EventValidator.new(self) validator = DiscourseCalendar::EventValidator.new(self)
validator.validate_event validator.validate_event

File diff suppressed because it is too large Load Diff

3
stylelint.config.mjs Normal file
View File

@ -0,0 +1,3 @@
export default {
extends: ["@discourse/lint-configs/stylelint"],
};

View File

@ -41,15 +41,17 @@ module("Integration | Component | MoreMenu", function (hooks) {
id: 322, id: 322,
}); });
await render(<template> await render(
<MoreMenu <template>
@event={{hash <MoreMenu
isExpired=false @event={{hash
creator=creator isExpired=false
canActOnDiscoursePostEvent=false creator=creator
}} canActOnDiscoursePostEvent=false
/> }}
</template>); />
</template>
);
await click(".discourse-post-event-more-menu-trigger"); await click(".discourse-post-event-more-menu-trigger");
assert.dom(".show-all-participants").exists(); assert.dom(".show-all-participants").exists();

View File

@ -13,6 +13,7 @@ import UpcomingEventsList, {
class RouterStub extends Service { class RouterStub extends Service {
currentRoute = { attributes: { category: { id: 1, slug: "announcements" } } }; currentRoute = { attributes: { category: { id: 1, slug: "announcements" } } };
currentRouteName = "discovery.latest"; currentRouteName = "discovery.latest";
on() {} on() {}
off() {} off() {}
} }
@ -218,9 +219,11 @@ module("Integration | Component | upcoming-events-list", function (hooks) {
test("with events, overridden time format", async function (assert) { test("with events, overridden time format", async function (assert) {
pretender.get("/discourse-post-event/events", twoEventsResponseHandler); pretender.get("/discourse-post-event/events", twoEventsResponseHandler);
await render(<template> await render(
<UpcomingEventsList @params={{hash timeFormat="LLL"}} /> <template>
</template>); <UpcomingEventsList @params={{hash timeFormat="LLL"}} />
</template>
);
this.appEvents.trigger("page:changed", { url: "/" }); this.appEvents.trigger("page:changed", { url: "/" });
@ -289,9 +292,9 @@ module("Integration | Component | upcoming-events-list", function (hooks) {
test("with events, overridden count parameter", async function (assert) { test("with events, overridden count parameter", async function (assert) {
pretender.get("/discourse-post-event/events", twoEventsResponseHandler); pretender.get("/discourse-post-event/events", twoEventsResponseHandler);
await render(<template> await render(
<UpcomingEventsList @params={{hash count=1}} /> <template><UpcomingEventsList @params={{hash count=1}} /></template>
</template>); );
this.appEvents.trigger("page:changed", { url: "/" }); this.appEvents.trigger("page:changed", { url: "/" });
@ -319,9 +322,11 @@ module("Integration | Component | upcoming-events-list", function (hooks) {
test("with events, overridden upcomingDays parameter", async function (assert) { test("with events, overridden upcomingDays parameter", async function (assert) {
pretender.get("/discourse-post-event/events", twoEventsResponseHandler); pretender.get("/discourse-post-event/events", twoEventsResponseHandler);
await render(<template> await render(
<UpcomingEventsList @params={{hash upcomingDays=1}} /> <template>
</template>); <UpcomingEventsList @params={{hash upcomingDays=1}} />
</template>
);
this.appEvents.trigger("page:changed", { url: "/" }); this.appEvents.trigger("page:changed", { url: "/" });