Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds unpublished icon to SingleEvent instances #8192

Conversation

michaelchadwick
Copy link
Contributor

Fixes ilios/ilios#3473

Single Events need to show if they are unpublished just like when they're viewed on the calendar, so I added the missing icon. I also made sure to put missing mouseover text, and fixed up some tests.

@stopfstedt stopfstedt removed the request for review from jrjohnson October 18, 2024 23:30
Copy link
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the two issues mentioned in single-event.hbs, this looks good to me.

however, it's missing test coverage on these icons in the integration test for the SingleEvent component.

please add this appropriate tests.

for reference, i'd like to point you at existing page-object attributes and integration tests. please see

module('iconography', function () {
test('recently updated', async function (assert) {
this.createEvent(
'2020-02-10 10:40:00',
'2020-02-10 12:30:00',
DateTime.now().toFormat('yyyy-LL-dd hh:mm:ss'),
false,
true,
);
const events = this.server.db.userevents;
this.set('event', events[0]);
this.set('events', events);
await render(
hbs`<WeeklyCalendarEvent @event={{this.event}} @allDayEvents={{this.events}} />`,
);
assert.ok(component.wasRecentlyUpdated);
});
test('not recently updated', async function (assert) {
this.createEvent(
'2020-02-10 10:40:00',
'2020-02-10 12:30:00',
'2012-01-09 08:00:00',
false,
true,
);
const events = this.server.db.userevents;
this.set('event', events[0]);
this.set('events', events);
await render(
hbs`<WeeklyCalendarEvent @event={{this.event}} @allDayEvents={{this.events}} />`,
);
assert.notOk(component.wasRecentlyUpdated);
});
test('scheduled', async function (assert) {
this.createEvent(
'2020-02-10 10:40:00',
'2020-02-10 12:30:00',
'2012-01-09 08:00:00',
true,
true,
);
const events = this.server.db.userevents;
this.set('event', events[0]);
this.set('events', events);
await render(
hbs`<WeeklyCalendarEvent @event={{this.event}} @allDayEvents={{this.events}} />`,
);
assert.ok(component.isScheduled);
});
test('draft', async function (assert) {
this.createEvent(
'2020-02-10 10:40:00',
'2020-02-10 12:30:00',
'2012-01-09 08:00:00',
true,
false,
);
const events = this.server.db.userevents;
this.set('event', events[0]);
this.set('events', events);
await render(
hbs`<WeeklyCalendarEvent @event={{this.event}} @allDayEvents={{this.events}} />`,
);
assert.ok(component.isDraft);
});
});

packages/ilios-common/addon/components/single-event.hbs Outdated Show resolved Hide resolved
packages/ilios-common/addon/components/single-event.hbs Outdated Show resolved Hide resolved
@michaelchadwick michaelchadwick force-pushed the frontend-3473-add-event-detail-unpub-icon branch from bcb36a2 to 57a5d8f Compare October 21, 2024 17:10
Copy link
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelchadwick michaelchadwick added the run ui tests Run the expensive UI tests label Oct 25, 2024
@dartajax dartajax merged commit 7f4e8e6 into ilios:master Oct 25, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run ui tests Run the expensive UI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event Detail Should Show Unpublished Icon if Offering is Unpublished
3 participants