mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
Fix flaky test src/room/composer/Banner/Banner.stories.tsx > With Avatar Image (#33275)
* Fix flaky test `src/room/composer/Banner/Banner.stories.tsx > With Avatar Image` it was previously loading an external (slow) image which was random (!) by design Fixes https://github.com/element-hq/element-web/issues/33273 * Fix styling * Iterate * Update snapshot
This commit is contained in:
committed by
GitHub
parent
12df09bd4b
commit
8f9953f419
@@ -213,12 +213,12 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-labelledby="_r_1c3_"
|
aria-labelledby="_r_1c3_"
|
||||||
class="_banner_193k4_8"
|
class="_banner_n7ud0_8"
|
||||||
data-type="critical"
|
data-type="critical"
|
||||||
role="status"
|
role="status"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="_icon_193k4_50"
|
class="_icon_n7ud0_50"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
@@ -234,7 +234,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="_content_193k4_38"
|
class="_content_n7ud0_38"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60 _title_1xryk_24"
|
class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60 _title_1xryk_24"
|
||||||
@@ -244,7 +244,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="_actions_193k4_60"
|
class="_actions_n7ud0_61"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="_button_13vu4_8 _primaryAction_1xryk_20 _has-icon_13vu4_60"
|
class="_button_13vu4_8 _primaryAction_1xryk_20 _has-icon_13vu4_60"
|
||||||
|
|||||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 22 KiB |
@@ -48,12 +48,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 24px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon img {
|
.icon img {
|
||||||
|
height: 24px;
|
||||||
|
aspect-ratio: auto;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { type Meta, type StoryObj } from "@storybook/react-vite";
|
|||||||
import { Button } from "@vector-im/compound-web";
|
import { Button } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { Banner } from "./Banner";
|
import { Banner } from "./Banner";
|
||||||
|
import avatarImage from "../../../../static/element.png";
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: "room/Banner",
|
title: "room/Banner",
|
||||||
@@ -58,7 +59,7 @@ export const WithAction: Story = {
|
|||||||
|
|
||||||
export const WithAvatarImage: Story = {
|
export const WithAvatarImage: Story = {
|
||||||
args: {
|
args: {
|
||||||
avatar: <img alt="Example" src="https://picsum.photos/32/32" />,
|
avatar: <img alt="Example" src={avatarImage} />,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ exports[`AvatarWithDetails > renders a banner with an avatar iamge 1`] = `
|
|||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
alt="Example"
|
alt="Example"
|
||||||
src="https://picsum.photos/32/32"
|
src="/static/element.png"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user