fix: use groupAcronym to determine hackathon icon in agenda ()

* fix: use groupAcronym to determine hackathon icon in agenda

* test: fix agenda tests related to hackathon
This commit is contained in:
Nicolas Giard 2025-02-14 18:14:03 -05:00 committed by GitHub
parent ed19b54d8a
commit d1ec7378da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions
client/agenda
playwright
helpers
tests/meeting

View file

@ -307,7 +307,7 @@ const meetingEvents = computed(() => {
}) })
} }
// -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise // -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise
if (item.name.toLowerCase().includes('hackathon')) { if (item.groupAcronym === 'hackathon') {
links.push({ links.push({
id: `lnk-${item.id}-wiki`, id: `lnk-${item.id}-wiki`,
label: 'Wiki', label: 'Wiki',
@ -461,7 +461,7 @@ const meetingEvents = computed(() => {
case 'other': case 'other':
if (item.name.toLowerCase().indexOf('office hours') >= 0) { if (item.name.toLowerCase().indexOf('office hours') >= 0) {
icon = 'bi-building' icon = 'bi-building'
} else if (item.name.toLowerCase().indexOf('hackathon') >= 0) { } else if (item.groupAcronym === 'hackathon') {
icon = 'bi-command bi-pink' icon = 'bi-command bi-pink'
} }
break break

View file

@ -395,7 +395,7 @@ module.exports = {
name: 'Hackathon Kickoff', name: 'Hackathon Kickoff',
startDateTime: day1.set({ hour: 10, minute: 30 }), startDateTime: day1.set({ hour: 10, minute: 30 }),
duration: '30m', duration: '30m',
...findAreaGroup('hackathon-kickoff', categories[2]), ...findAreaGroup('hackathon', categories[2]),
showAgenda: true, showAgenda: true,
hasAgenda: true, hasAgenda: true,
hasRecordings: true, hasRecordings: true,

View file

@ -238,7 +238,7 @@ test.describe('past - desktop', () => {
// Name column // Name column
// ----------- // -----------
// Event icon // Event icon
if (['break', 'plenary'].includes(event.type) || (event.type === 'other' && ['office hours', 'hackathon'].some(s => event.name.toLowerCase().indexOf(s) >= 0))) { if (['break', 'plenary'].includes(event.type) || (event.type === 'other' && event.name.toLowerCase().indexOf('office hours') >= 0)) {
await expect(row.locator('.agenda-table-cell-name > i.bi')).toBeVisible() await expect(row.locator('.agenda-table-cell-name > i.bi')).toBeVisible()
} }
// Name link // Name link
@ -286,7 +286,7 @@ test.describe('past - desktop', () => {
// No meeting materials yet warning badge // No meeting materials yet warning badge
await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible() await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible()
} }
if (event.name.toLowerCase().includes('hackathon')) { if (event.groupAcronym === 'hackathon') {
// Hackathon Wiki button // Hackathon Wiki button
const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon` 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`)).toHaveAttribute('href', hackathonWikiLink)
@ -1169,7 +1169,7 @@ test.describe('future - desktop', () => {
// No meeting materials yet warning badge // No meeting materials yet warning badge
await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible() await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible()
} }
if (event.name.toLowerCase().includes('hackathon')) { if (event.groupAcronym === 'hackathon') {
// Hackathon Wiki button // Hackathon Wiki button
const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon` 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`)).toHaveAttribute('href', hackathonWikiLink)