fix: Always label agenda session headers with day in meeting time zone (#5282)
* fix: Always label agenda session headers with day in meeting time zone * test: Test day labeling on agenda session header when changing tz * test: Label timeslot, not session, as 'Session I' etc for agenda tests
This commit is contained in:
parent
1d87686a2b
commit
996e6c2011
|
@ -263,7 +263,7 @@ const meetingEvents = computed(() => {
|
||||||
key: `sesshd-${item.id}`,
|
key: `sesshd-${item.id}`,
|
||||||
displayType: 'session-head',
|
displayType: 'session-head',
|
||||||
timeslot: itemTimeSlot,
|
timeslot: itemTimeSlot,
|
||||||
name: `${item.adjustedStart.toFormat('cccc')} ${item.slotName}`,
|
name: `${item.adjustedStart.setZone(agendaStore.meeting.timezone).toFormat('cccc')} ${item.slotName}`,
|
||||||
cssClasses: 'agenda-table-display-session-head' + (isLive ? ' agenda-table-live' : '')
|
cssClasses: 'agenda-table-display-session-head' + (isLive ? ' agenda-table-live' : '')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,6 +121,7 @@ let lastSessionId = 25000
|
||||||
let lastRecordingId = 150000
|
let lastRecordingId = 150000
|
||||||
function createEvent ({
|
function createEvent ({
|
||||||
name = '',
|
name = '',
|
||||||
|
slotName = '',
|
||||||
startDateTime,
|
startDateTime,
|
||||||
duration = '1h',
|
duration = '1h',
|
||||||
area,
|
area,
|
||||||
|
@ -152,6 +153,7 @@ function createEvent ({
|
||||||
acronym: group.keyword,
|
acronym: group.keyword,
|
||||||
duration: typeof duration === 'string' ? ms(duration) / 1000 : duration,
|
duration: typeof duration === 'string' ? ms(duration) / 1000 : duration,
|
||||||
name: eventName,
|
name: eventName,
|
||||||
|
slotName: slotName,
|
||||||
startDateTime: startDateTime.toISO({ includeOffset: false, suppressMilliseconds: true }),
|
startDateTime: startDateTime.toISO({ includeOffset: false, suppressMilliseconds: true }),
|
||||||
status,
|
status,
|
||||||
type,
|
type,
|
||||||
|
@ -514,7 +516,7 @@ module.exports = {
|
||||||
_.times(8, () => { // 8 lanes per session time
|
_.times(8, () => { // 8 lanes per session time
|
||||||
const { area, ...group } = daySessions.pop()
|
const { area, ...group } = daySessions.pop()
|
||||||
schedule.push(createEvent({
|
schedule.push(createEvent({
|
||||||
name: 'Session I',
|
slotName: 'Session I',
|
||||||
startDateTime: curDay.set({ hour: 10 }),
|
startDateTime: curDay.set({ hour: 10 }),
|
||||||
duration: '2h',
|
duration: '2h',
|
||||||
type: 'regular',
|
type: 'regular',
|
||||||
|
@ -543,7 +545,7 @@ module.exports = {
|
||||||
_.times(8, () => { // 8 lanes per session time
|
_.times(8, () => { // 8 lanes per session time
|
||||||
const { area, ...group } = daySessions.pop()
|
const { area, ...group } = daySessions.pop()
|
||||||
schedule.push(createEvent({
|
schedule.push(createEvent({
|
||||||
name: 'Session II',
|
slotName: 'Session II',
|
||||||
startDateTime: curDay.set({ hour: 13, minute: 30 }),
|
startDateTime: curDay.set({ hour: 13, minute: 30 }),
|
||||||
duration: '1h',
|
duration: '1h',
|
||||||
type: 'regular',
|
type: 'regular',
|
||||||
|
@ -574,7 +576,7 @@ module.exports = {
|
||||||
_.times(8, () => { // 8 lanes per session time
|
_.times(8, () => { // 8 lanes per session time
|
||||||
const { area, ...group } = daySessions.pop()
|
const { area, ...group } = daySessions.pop()
|
||||||
schedule.push(createEvent({
|
schedule.push(createEvent({
|
||||||
name: 'Session III',
|
slotName: 'Session III',
|
||||||
startDateTime: curDay.set({ hour: 15 }),
|
startDateTime: curDay.set({ hour: 15 }),
|
||||||
duration: '2h',
|
duration: '2h',
|
||||||
type: 'regular',
|
type: 'regular',
|
||||||
|
|
|
@ -138,6 +138,7 @@ test.describe('past - desktop', () => {
|
||||||
.setLocale(BROWSER_LOCALE)
|
.setLocale(BROWSER_LOCALE)
|
||||||
.toFormat('DD \'at\' T ZZZZ')
|
.toFormat('DD \'at\' T ZZZZ')
|
||||||
await expect(page.locator('.agenda h6').first()).toContainText(localDateTime)
|
await expect(page.locator('.agenda h6').first()).toContainText(localDateTime)
|
||||||
|
await expect(page.locator('.agenda .agenda-table-display-session-head .agenda-table-cell-name').first()).toContainText('Monday Session I')
|
||||||
// Switch to UTC
|
// Switch to UTC
|
||||||
await tzUtcBtnLocator.click()
|
await tzUtcBtnLocator.click()
|
||||||
await expect(tzUtcBtnLocator).toHaveClass(/n-button--primary-type/)
|
await expect(tzUtcBtnLocator).toHaveClass(/n-button--primary-type/)
|
||||||
|
@ -148,10 +149,12 @@ test.describe('past - desktop', () => {
|
||||||
.toFormat('DD \'at\' T ZZZZ')
|
.toFormat('DD \'at\' T ZZZZ')
|
||||||
await expect(page.locator('.agenda h6').first()).toContainText(utcDateTime)
|
await expect(page.locator('.agenda h6').first()).toContainText(utcDateTime)
|
||||||
await expect(page.locator('.agenda .agenda-timezone-ddn')).toContainText('UTC')
|
await expect(page.locator('.agenda .agenda-timezone-ddn')).toContainText('UTC')
|
||||||
|
await expect(page.locator('.agenda .agenda-table-display-session-head .agenda-table-cell-name').first()).toContainText('Monday Session I')
|
||||||
// Switch back to meeting timezone
|
// Switch back to meeting timezone
|
||||||
await tzMeetingBtnLocator.click()
|
await tzMeetingBtnLocator.click()
|
||||||
await expect(tzMeetingBtnLocator).toHaveClass(/n-button--primary-type/)
|
await expect(tzMeetingBtnLocator).toHaveClass(/n-button--primary-type/)
|
||||||
await expect(page.locator('.agenda .agenda-timezone-ddn')).toContainText('Tokyo')
|
await expect(page.locator('.agenda .agenda-timezone-ddn')).toContainText('Tokyo')
|
||||||
|
await expect(page.locator('.agenda .agenda-table-display-session-head .agenda-table-cell-name').first()).toContainText('Monday Session I')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue