From 185c4d556cedbb2f6b217ba152ddb35019cfc40f Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 27 Jan 2023 13:55:05 -0400 Subject: [PATCH] fix: Show links for more session types on the agenda (#5038) * fix: Show links for more session types on the agenda * test: Update test to expect buttons on additional sessions * test: Update the past meeting test case also --- client/agenda/AgendaScheduleList.vue | 4 +++- ietf/meeting/views.py | 1 + playwright/tests/meeting/agenda.spec.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/agenda/AgendaScheduleList.vue b/client/agenda/AgendaScheduleList.vue index 87982ee626..a42315fc4b 100644 --- a/client/agenda/AgendaScheduleList.vue +++ b/client/agenda/AgendaScheduleList.vue @@ -270,7 +270,9 @@ const meetingEvents = computed(() => { // -> Populate event links const links = [] - if (item.flags.showAgenda || ['regular', 'plenary'].includes(item.type)) { + const typesWithLinks = ['regular', 'plenary', 'other'] + const purposesWithoutLinks = ['admin', 'closed_meeting', 'officehours', 'social'] + if (item.flags.showAgenda || (typesWithLinks.includes(item.type) && !purposesWithoutLinks.includes(item.purpose))) { if (item.flags.agenda) { links.push({ id: `lnk-${item.id}-tar`, diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 9415be9bc9..9989713c43 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -1708,6 +1708,7 @@ def agenda_extract_schedule (item): "startDateTime": item.timeslot.time.isoformat(), "status": item.session.current_status, "type": item.session.type.slug, + "purpose": item.session.purpose.slug, "isBoF": item.session.group_at_the_time().state_id == "bof", "filterKeywords": item.filter_keywords, "groupAcronym": item.session.group_at_the_time().acronym, diff --git a/playwright/tests/meeting/agenda.spec.js b/playwright/tests/meeting/agenda.spec.js index 33fb7a9f3d..6fac4ddf60 100644 --- a/playwright/tests/meeting/agenda.spec.js +++ b/playwright/tests/meeting/agenda.spec.js @@ -268,7 +268,7 @@ test.describe('past - desktop', () => { } // Scheduled case 'sched': { - if (event.flags.showAgenda || ['regular', 'plenary'].includes(event.type)) { + if (event.flags.showAgenda || (['regular', 'plenary', 'other'].includes(event.type) && !['admin', 'closed_meeting', 'officehours', 'social'].includes(event.purpose))) { const eventButtons = row.locator('.agenda-table-cell-links > .agenda-table-cell-links-buttons') if (event.flags.agenda) { // Show meeting materials button @@ -1145,7 +1145,7 @@ test.describe('future - desktop', () => { // ----------------------- if (event.status === 'sched') { const eventButtons = row.locator('.agenda-table-cell-links > .agenda-table-cell-links-buttons') - if (event.flags.showAgenda || ['regular', 'plenary'].includes(event.type)) { + if (event.flags.showAgenda || (['regular', 'plenary', 'other'].includes(event.type) && !['admin', 'closed_meeting', 'officehours', 'social'].includes(event.purpose))) { if (event.flags.agenda) { // Show meeting materials button await expect(eventButtons.locator('i.bi.bi-collection')).toBeVisible()