Skip to content

Commit b3324ff

Browse files
committed
Ignore video element in Chromatic
1 parent ee5833c commit b3324ff

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dotcom-rendering/src/components/LoopVideo.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const Without5to4Ratio: Story = {
4444

4545
export const PausePlay: Story = {
4646
...Default,
47+
name: 'Pause and play interaction',
4748
play: async ({ canvasElement }) => {
4849
const canvas = within(canvasElement);
4950
const videoEl = canvas.getByTestId('loop-video');
@@ -64,6 +65,7 @@ export const PausePlay: Story = {
6465

6566
export const UnmuteMute: Story = {
6667
...Default,
68+
name: 'Unmute and mute interaction',
6769
parameters: {
6870
test: {
6971
// The following error is received without this flag: "TypeError: ophan.trackClickComponentEvent is not a function"
@@ -90,6 +92,7 @@ function sleep(ms: number) {
9092

9193
export const InteractionObserver: Story = {
9294
...Default,
95+
name: 'Interaction observer',
9396
render: (args) => (
9497
<div data-testid="test-container">
9598
<LoopVideo {...args} />

dotcom-rendering/src/components/LoopVideoPlayer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export const LoopVideoPlayer = forwardRef(
144144
data-link-name={`gu-video-loop-${
145145
showPlayIcon ? 'play' : 'pause'
146146
}-${atomId}`}
147+
data-chromatic="ignore"
147148
preload={preloadPartialData ? 'metadata' : 'none'}
148149
loop={true}
149150
muted={isMuted}

0 commit comments

Comments
 (0)