summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts')
-rw-r--r--packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts b/packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts
index e46a708192..57b3e75513 100644
--- a/packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts
+++ b/packages/frontend/src/components/MkGalleryPostPreview.stories.impl.ts
@@ -28,9 +28,11 @@ export const Default = {
async play({ canvasElement }) {
const canvas = within(canvasElement);
const links = canvas.getAllByRole('link');
- await expect(links).toHaveLength(2);
- await expect(links[0]).toHaveAttribute('href', `/gallery/${galleryPost().id}`);
- await expect(links[1]).toHaveAttribute('href', `/@${galleryPost().user.username}@${galleryPost().user.host}`);
+ expect(links).toHaveLength(2);
+ expect(links[0]).toHaveAttribute('href', `/gallery/${galleryPost().id}`);
+ expect(links[1]).toHaveAttribute('href', `/@${galleryPost().user.username}@${galleryPost().user.host}`);
+ const images = canvas.getAllByRole<HTMLImageElement>('img');
+ await waitFor(() => expect(Promise.all(images.map((image) => image.decode()))).resolves.toBeDefined());
},
args: {
post: galleryPost(),