Skip to content

Commit cc7cf81

Browse files
committed
added a bunch of testids to simplify playwright e2e tests
1 parent 0ec9583 commit cc7cf81

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

mobile/src/components/events/AvailableEventsList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
scrollable
55
@ion-change="(event) => categoryUpdated(event.detail.value)">
66
<ion-segment-button v-for="(categorizedEvents, index) in perCategoryEventsRef" :key="index"
7-
:value="categorizedEvents.category">
7+
:value="categorizedEvents.category" :data-testid="categorizedEvents.testId">
88
<ion-label>{{ categorizedEvents.label }} <span class="count">{{categorizedEvents.eventsCount}}</span></ion-label>
99
</ion-segment-button>
1010
</ion-segment>
@@ -57,6 +57,7 @@ const { LL } = typesafeI18n()
5757
5858
type CategoryEvents = {
5959
category: "future"|"past",
60+
testId: string,
6061
label: string,
6162
eventsCount: number,
6263
sections: Array<{
@@ -76,6 +77,7 @@ const perCategoryEventsRef = computed(() => {
7677
7778
const categories: CategoryEvents[] = [{
7879
category: 'future',
80+
testId: 'future-events-tab',
7981
label: LL.value.Future_events(),
8082
eventsCount: ongoingEvents.length + futureEvents.length,
8183
sections: [{
@@ -87,6 +89,7 @@ const perCategoryEventsRef = computed(() => {
8789
}]
8890
}, {
8991
category: 'past',
92+
testId: 'past-events-tab',
9093
label: LL.value.Past_events(),
9194
eventsCount: pastEvents.length,
9295
sections: [{

mobile/src/components/events/CurrentEventHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ion-header class="ion-no-border">
33
<ion-toolbar :style="{ '--background': headingBackground }">
44
<div class="viewsHeader">
5-
<ion-button class="viewsHeader-back" @click="backButtonClicked" shape="round" :aria-label="LL.Back_List_Events()">
5+
<ion-button class="viewsHeader-back" @click="backButtonClicked" shape="round" :aria-label="LL.Back_List_Events()" data-testid="back-to-events-list">
66
<ion-icon src="/assets/icons/solid/checkbox-list.svg"></ion-icon>
77
</ion-button>
88
<!-- TODO: Fix router navigation from preferences/schedule prior to re-enabling this one -->

mobile/src/components/events/EventTabs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<ion-tabs ref="$tabs" v-if="confDescriptor" v-themed-event-styles="confDescriptor">
33
<ion-router-outlet></ion-router-outlet>
4-
<ion-tab-bar slot="bottom" ref="$tabBarRef">
4+
<ion-tab-bar slot="bottom" ref="$tabBarRef" data-testid="event-tabs">
55
<ion-tab-button v-for="(tab, index) in tabs" :key="index"
66
:tab="tab.id" :href="tab.url">
77
<ion-icon aria-hidden="true" :src="$tabBarRef?.tabState.activeTab === tab.id ? tab.selectedIcon : tab.icon" />

mobile/src/components/schedule/DaySelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
past: today.localeCompare(day.localDate) === 1,
1414
today: today.localeCompare(day.localDate) === 0,
1515
future: today.localeCompare(day.localDate) === -1,
16-
}" :aria-label="LL.View_day() + ' ' + day.formatted.day + ' ' + day.formatted.month">
16+
}" :aria-label="LL.View_day() + ' ' + day.formatted.day + ' ' + day.formatted.month" :data-testid="`day#${index+1}`">
1717
<span v-if="today.localeCompare(day.localDate) === 0"
1818
class="todayIndicator">
1919
</span>

mobile/src/views/TalkDetailsPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ion-header class="stickyHeader" v-if="talkNotes" :class="{ 'is-favorited': talkNotes.isFavorite, 'to-watch-later': talkNotes.watchLater }">
55
<ion-toolbar>
66
<ion-button class="stickyHeader-close" shape="round" slot="start" size="small" fill="outline" @click="closeAndNavigateBack()"
7-
:aria-label="LL.Close_talk_details()">
7+
:aria-label="LL.Close_talk_details()" data-testid="close-talk-details">
88
<ion-icon src="/assets/icons/solid/close.svg"></ion-icon>
99
</ion-button>
1010
<ion-title class="stickyHeader-title" slot="start" >{{ LL.Talk_details() }}</ion-title>

0 commit comments

Comments
 (0)