Skip to content

Commit

Permalink
fix: Show links for more session types on the agenda (#5038)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jennifer-richards committed Jan 27, 2023
1 parent e7c2063 commit 185c4d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/agenda/AgendaScheduleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
1 change: 1 addition & 0 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions playwright/tests/meeting/agenda.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 185c4d5

Please sign in to comment.