From 1209bcff87229845700ef4d9e57ded1c289df90f Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 3 Nov 2024 08:13:06 +0000 Subject: [PATCH 1/3] feat: add wiki button to agenda list for hackathon sessions --- client/agenda/AgendaScheduleList.vue | 14 +++++++++++++- client/shared/urls.json | 1 + ietf/templates/meeting/agenda.html | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/client/agenda/AgendaScheduleList.vue b/client/agenda/AgendaScheduleList.vue index 28699925792..dfc5062493a 100644 --- a/client/agenda/AgendaScheduleList.vue +++ b/client/agenda/AgendaScheduleList.vue @@ -276,6 +276,7 @@ const meetingEvents = computed(() => { const purposesWithoutLinks = ['admin', 'closed_meeting', 'officehours', 'social'] if (item.flags.showAgenda || (typesWithLinks.includes(item.type) && !purposesWithoutLinks.includes(item.purpose))) { if (item.flags.agenda) { + // -> Meeting Materials links.push({ id: `lnk-${item.id}-tar`, label: 'Download meeting materials as .tar archive', @@ -297,7 +298,18 @@ const meetingEvents = computed(() => { color: 'red' }) } - if (agendaStore.usesNotes) { + // -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise + if (item.name.toLowerCase().indexOf('hackathon') >= 0) { + links.push({ + id: `lnk-${item.id}-wiki`, + label: 'Wiki', + icon: 'book', + href: getUrl('hackathonWiki', { + meetingNumber: agendaStore.meeting.number + }), + color: 'blue' + }) + } else if (agendaStore.usesNotes) { links.push({ id: `lnk-${item.id}-note`, label: 'Notepad for note-takers', diff --git a/client/shared/urls.json b/client/shared/urls.json index 285caa07d2c..15410d68df1 100644 --- a/client/shared/urls.json +++ b/client/shared/urls.json @@ -1,5 +1,6 @@ { "bofDefinition": "https://www.ietf.org/how/bofs/", + "hackathonWiki": "https://wiki.ietf.org/meeting/{meetingNumber}/hackathon", "meetingCalIcs": "/meeting/{meetingNumber}/agenda.ics", "meetingDetails": "/meeting/{meetingNumber}/session/{eventAcronym}/", "meetingMaterialsPdf": "/meeting/{meetingNumber}/agenda/{eventAcronym}-drafts.pdf", diff --git a/ietf/templates/meeting/agenda.html b/ietf/templates/meeting/agenda.html index f3228aa5adb..089141bde80 100644 --- a/ietf/templates/meeting/agenda.html +++ b/ietf/templates/meeting/agenda.html @@ -101,7 +101,7 @@
{% endblock %} From 4bc0f028cc67eb59e2e6dd0adea16914b2050ae2 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sun, 3 Nov 2024 05:01:07 -0500 Subject: [PATCH 2/3] fix: update client/agenda/AgendaScheduleList.vue Co-authored-by: Matthew Holloway --- client/agenda/AgendaScheduleList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/agenda/AgendaScheduleList.vue b/client/agenda/AgendaScheduleList.vue index dfc5062493a..6b973c569d1 100644 --- a/client/agenda/AgendaScheduleList.vue +++ b/client/agenda/AgendaScheduleList.vue @@ -299,7 +299,7 @@ const meetingEvents = computed(() => { }) } // -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise - if (item.name.toLowerCase().indexOf('hackathon') >= 0) { + if (item.name.toLowerCase().contains('hackathon')) { links.push({ id: `lnk-${item.id}-wiki`, label: 'Wiki', From 0f24975e6c6005be247b635766e1b319abd6fb0b Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 14 Dec 2024 03:44:48 +0000 Subject: [PATCH 3/3] fix: broken tests --- client/agenda/AgendaScheduleList.vue | 2 +- playwright/tests/meeting/agenda.spec.js | 30 ++++++++++++++++++------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/client/agenda/AgendaScheduleList.vue b/client/agenda/AgendaScheduleList.vue index fd52bff4197..e7c14797ee2 100644 --- a/client/agenda/AgendaScheduleList.vue +++ b/client/agenda/AgendaScheduleList.vue @@ -307,7 +307,7 @@ const meetingEvents = computed(() => { }) } // -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise - if (item.name.toLowerCase().contains('hackathon')) { + if (item.name.toLowerCase().includes('hackathon')) { links.push({ id: `lnk-${item.id}-wiki`, label: 'Wiki', diff --git a/playwright/tests/meeting/agenda.spec.js b/playwright/tests/meeting/agenda.spec.js index 109e1b3b810..d31dbd5c2c5 100644 --- a/playwright/tests/meeting/agenda.spec.js +++ b/playwright/tests/meeting/agenda.spec.js @@ -286,10 +286,17 @@ test.describe('past - desktop', () => { // No meeting materials yet warning badge await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible() } - // Notepad button - const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}` - await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink) - await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible() + if (event.name.toLowerCase().includes('hackathon')) { + // Hackathon Wiki button + const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon` + await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki`)).toHaveAttribute('href', hackathonWikiLink) + await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki > i.bi`)).toBeVisible() + } else { + // Notepad button + const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}` + await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink) + await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible() + } // Chat logs await expect(eventButtons.locator(`#btn-lnk-${event.id}-logs`)).toHaveAttribute('href', event.links.chatArchive) await expect(eventButtons.locator(`#btn-lnk-${event.id}-logs > i.bi`)).toBeVisible() @@ -1162,10 +1169,17 @@ test.describe('future - desktop', () => { // No meeting materials yet warning badge await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible() } - // Notepad button - const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}` - await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink) - await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible() + if (event.name.toLowerCase().includes('hackathon')) { + // Hackathon Wiki button + const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon` + await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki`)).toHaveAttribute('href', hackathonWikiLink) + await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki > i.bi`)).toBeVisible() + } else { + // Notepad button + const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}` + await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink) + await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible() + } // Chat room await expect(eventButtons.locator(`#btn-lnk-${event.id}-room`)).toHaveAttribute('href', event.links.chat) await expect(eventButtons.locator(`#btn-lnk-${event.id}-room > i.bi`)).toBeVisible()