-
Notifications
You must be signed in to change notification settings - Fork 27
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
adds unpublished icon to SingleEvent instances #8192
Conversation
There was a problem hiding this 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
frontend/packages/test-app/tests/integration/components/weekly-calendar-event-test.js
Lines 418 to 486 in 4718d37
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); | |
}); | |
}); |
bcb36a2
to
57a5d8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.