Skip to content

Commit

Permalink
BC-8181 - Implement New Room E2E Test in Cypress (#3451)
Browse files Browse the repository at this point in the history
* adding test ids for rooms cypress tests

* fixing dataTestId
  • Loading branch information
MartinSchuhmacher authored Nov 18, 2024
1 parent 138befa commit 45f68c7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
8 changes: 5 additions & 3 deletions src/modules/feature/room/RoomMembers/AddMembers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<template v-slot:default>
<div class="ml-6 mr-6">
<div class="mt-3">
<div class="mt-3" data-testid="add-participant-school">
<v-autocomplete
ref="autoCompleteSchool"
v-model="selectedSchool"
Expand All @@ -22,7 +22,7 @@
/>
</div>

<div class="mt-4">
<div class="mt-4" data-testid="add-participant-role">
<v-autocomplete
ref="autoCompleteRole"
v-model="selectedRole"
Expand All @@ -37,7 +37,7 @@
/>
</div>

<div class="mt-4">
<div class="mt-4" data-testid="add-participant-name">
<v-autocomplete
ref="autoCompleteUsers"
v-model="selectedUsers"
Expand All @@ -64,6 +64,7 @@
class="ms-auto mr-2"
color="primary"
:text="t('common.actions.cancel')"
data-testid="add-participant-cancel-btn"
@click="onClose"
/>
<v-btn
Expand All @@ -72,6 +73,7 @@
color="primary"
variant="flat"
:text="t('common.actions.add')"
data-testid="add-participant-save-btn"
@click="onAddMembers"
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/modules/feature/room/RoomMembers/MembersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
:no-data-text="t('common.nodata')"
:mobile="null"
mobile-breakpoint="sm"
data-testid="participants-table"
@update:current-items="onUpdateFilter"
>
<template #[`item.actions`]="{ item }">
Expand Down
4 changes: 3 additions & 1 deletion src/modules/page/room/RoomCreate.page.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<DefaultWireframe max-width="short" :breadcrumbs="breadcrumbs">
<template #header>
<h1 class="text-h3 mb-4">{{ $t("pages.rooms.fab.title") }}</h1>
<h1 class="text-h3 mb-4" data-testid="page-title">
{{ $t("pages.rooms.fab.title") }}
</h1>
</template>
<RoomForm :room="roomData" @save="onSave" @cancel="onCancel" />
</DefaultWireframe>
Expand Down
1 change: 1 addition & 0 deletions src/modules/page/room/RoomDetails.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<VListItem
role="menuitem"
:to="`/rooms/${room.id}/members`"
data-testid="room-action-manage-participants"
:aria-label="t('pages.rooms.members.manage')"
>
<template #prepend>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/page/room/RoomEdit.page.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<DefaultWireframe max-width="short" :breadcrumbs="breadcrumbs">
<template #header>
<h1 class="text-h3 mb-4">
<h1 class="text-h3 mb-4" data-testid="page-title">
{{ $t("pages.roomDetails.ariaLabels.menu.action.edit") }}
</h1>
</template>
Expand Down
5 changes: 3 additions & 2 deletions src/modules/page/room/RoomMembers.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@fab:clicked="onFabClick"
>
<template #header>
<h1 class="text-h3 mb-4">
<h1 class="text-h3 mb-4" data-testid="room-title">
{{ t("pages.rooms.members.manage") }}
</h1>
</template>
Expand All @@ -27,6 +27,7 @@
:width="xs ? 'auto' : 480"
persistent
max-width="480"
data-testid="dialog-add-participants"
>
<AddMembers
:memberList="potentialRoomMembers"
Expand Down Expand Up @@ -149,6 +150,6 @@ const fabAction = {
icon: mdiPlus,
title: t("pages.rooms.members.add"),
ariaLabel: t("pages.rooms.members.add"),
testId: "fab-add-members",
dataTestId: "fab-add-members",
};
</script>
2 changes: 1 addition & 1 deletion src/modules/page/room/Rooms.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ const fabAction = {
title: t("common.actions.create"),
to: "/rooms/new",
ariaLabel: t("pages.rooms.fab.title"),
testId: "fab-add-room",
dataTestId: "fab-add-room",
};
</script>

0 comments on commit 45f68c7

Please sign in to comment.