Skip to content

Commit

Permalink
Disable chromatic snapshots on flaky tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
domlander committed Dec 23, 2024
1 parent c46b897 commit a5c5cce
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dotcom-rendering/src/components/ArticleHeadline.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ export const EditorialDesign = {
},
} satisfies Story;

/**
* Skipped (flaky).
*
* This story fails intermittently. It is unclear to whether it is the icon, the
* image, the font, or something else that is causing the issue.
*
* Example: https://www.chromatic.com/test?appId=637e406971a9af18ddba0505&id=665eecc338adeba89d31f92b
*/
export const MatchReportDesignSportTheme = {
args: {
...StandardDesign.args,
Expand All @@ -263,6 +271,9 @@ export const MatchReportDesignSportTheme = {
},
},
name: 'MatchReport Design, Sport Theme',
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Story;

export const LiveBlogDesign = {
Expand Down
11 changes: 11 additions & 0 deletions dotcom-rendering/src/components/Discussion/Comments.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ InitialPage.decorators = [
]),
];

/**
* Skipped (flaky).
*
* This story fails intermittently. The monospaced
* text: "code" is often different in the snapshot.
*
* Example: https://www.chromatic.com/test?appId=63e251470cfbe61776b0ef19&id=6659d8e7fde909fdd4dbf8b9
*/
export const LoggedInHiddenNoPicks = () => {
return (
<div
Expand Down Expand Up @@ -199,6 +207,9 @@ export const LoggedInHiddenNoPicks = () => {
LoggedInHiddenNoPicks.storyName =
'when logged in, with no picks and not expanded';
LoggedInHiddenNoPicks.decorators = [splitTheme([format])];
LoggedInHiddenNoPicks.story = {
chromatic: { disable: true },
};

export const LoggedIn = () => {
return (
Expand Down
15 changes: 15 additions & 0 deletions dotcom-rendering/src/components/DocumentBlockComponent.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { DocumentBlockComponent } from './DocumentBlockComponent.importable';
export default {
component: DocumentBlockComponent,
title: 'Components/DocumentBlockComponent',
parameters: {
chromatic: { disableSnapshot: true },
},
};

const Wrapper = ({ children }: { children: React.ReactNode }) => (
Expand All @@ -17,6 +20,15 @@ const Wrapper = ({ children }: { children: React.ReactNode }) => (
</div>
);

/**
* Skipped (flaky).
*
* This story fails intermittently. The text: "fit width" in
* the button in the bottom-right sometimes causes a difference.
* often different in the snapshot.
*
* Example: https://www.chromatic.com/test?appId=63e251470cfbe61776b0ef19&id=676405bf6014bfa8ccddc7be
*/
export const documentEmbed = () => {
return (
<Wrapper>
Expand All @@ -43,3 +55,6 @@ export const documentEmbed = () => {
);
};
documentEmbed.storyName = 'document embed';
documentEmbed.story = {
chromatic: { disable: true },
};
11 changes: 11 additions & 0 deletions dotcom-rendering/src/components/VimeoBlockComponent.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ largeAspectRatio.story = {
chromatic: { disable: true },
};

/**
* Skipped (flaky).
*
* This story fails intermittently. Sometimes the video doesn't load
* with the error message: "We couldn't verify the security of your connection."
*
* Example: https://www.chromatic.com/test?appId=63e251470cfbe61776b0ef19&id=6762b11e0dbf28eb24702ff1
*/
export const verticalAspectRatio = () => {
return (
<Wrapper>
Expand All @@ -92,3 +100,6 @@ export const verticalAspectRatio = () => {
);
};
verticalAspectRatio.storyName = 'with vertical aspect ratio';
verticalAspectRatio.story = {
chromatic: { disable: true },
};
13 changes: 12 additions & 1 deletion dotcom-rendering/src/layouts/DecideLayout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,23 @@ export const AppsPictureShowcaseOpinionDark: Story = {
parameters: appsParameters,
};

/**
* Skipped (flaky).
*
* This story fails intermittently as an iframe is inserted into the page
* which is sometimes registered by the snapshot.
*
* Example: https://www.chromatic.com/test?appId=63e251470cfbe61776b0ef19&id=675aaa4f3aa384bd64bde3a1
*/
export const WebPhotoEssayImmersiveLabsLight: Story = {
args: {
article: enhanceArticleType(PhotoEssayImmersiveLabsFixture, 'Web')
.frontendData,
},
parameters: webParameters,
parameters: {
...webParameters,
chromatic: { disableSnapshot: true },
},
};

const standardStandardLabsWebFixture: ArticleDeprecated = {
Expand Down

0 comments on commit a5c5cce

Please sign in to comment.