Skip to content

Commit 87c3a9d

Browse files
authored
feat(agenda): Show calendar links to all the events (#9843)
* feat(agenda): Show calendar links to all the events * test: Update playwright tests
1 parent c47fe34 commit 87c3a9d

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

client/agenda/AgendaScheduleList.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -398,16 +398,6 @@ const meetingEvents = computed(() => {
398398
color: 'teal'
399399
})
400400
}
401-
// -> Calendar item
402-
if (item.links.calendar) {
403-
links.push({
404-
id: `lnk-${item.id}-calendar`,
405-
label: 'Calendar (.ics) entry for this session',
406-
icon: 'calendar-check',
407-
href: item.links.calendar,
408-
color: 'pink'
409-
})
410-
}
411401
} else {
412402
// -> Post event
413403
if (meetingNumberInt >= 60) {
@@ -484,6 +474,16 @@ const meetingEvents = computed(() => {
484474
}
485475
}
486476
}
477+
// Add Calendar item for all events that has a calendar link
478+
if (item.adjustedEnd > current && item.links.calendar) {
479+
links.push({
480+
id: `lnk-${item.id}-calendar`,
481+
label: 'Calendar (.ics) entry for this session',
482+
icon: 'calendar-check',
483+
href: item.links.calendar,
484+
color: 'pink'
485+
})
486+
}
487487
488488
// Event icon
489489
let icon = null

playwright/tests/meeting/agenda.spec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,12 @@ test.describe('future - desktop', () => {
12191219
await expect(eventButtons.locator(`#btn-lnk-${event.id}-calendar > i.bi`)).toBeVisible()
12201220
}
12211221
} else {
1222-
await expect(eventButtons).toHaveCount(0)
1222+
if (event.links.calendar) {
1223+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-calendar`)).toHaveAttribute('href', event.links.calendar)
1224+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-calendar > i.bi`)).toBeVisible()
1225+
} else {
1226+
await expect(eventButtons).toHaveCount(0)
1227+
}
12231228
}
12241229
}
12251230
}

0 commit comments

Comments
 (0)