Add AlbumCard UI tests

- add libraries for component UI testing
- implement AlbumCard UI tests
This commit is contained in:
Jaime Baez
2022-09-07 16:00:57 +02:00
parent 92c4f0598b
commit f476bd985b
6 changed files with 506 additions and 10 deletions

View File

@@ -53,11 +53,13 @@
<div
class="h-[339px] w-[275px] hover:cursor-pointer mt-4 relative"
on:click={() => dispatchClick('click', album)}
data-testid="album-card"
>
<div
id={`icon-${album.id}`}
class="absolute top-2 right-2"
on:click|stopPropagation|preventDefault={showAlbumContextMenu}
data-testid="context-button-parent"
>
<CircleIconButton
logo={DotsVertical}
@@ -72,15 +74,16 @@
src={imageData}
alt={album.id}
class={`object-cover h-full w-full transition-all z-0 rounded-xl duration-300 hover:shadow-lg`}
data-testid="album-image"
/>
</div>
<div class="mt-4">
<p class="text-sm font-medium text-gray-800">
<p class="text-sm font-medium text-gray-800" data-testid="album-name">
{album.albumName}
</p>
<span class="text-xs flex gap-2">
<span class="text-xs flex gap-2" data-testid="album-details">
<p>{album.assetCount} items</p>
{#if album.shared}