Skip to content

Commit 6014a04

Browse files
committed
branch
1 parent 459d56e commit 6014a04

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

frontend/packages/component-library/src/cms/section/stories/Section.story.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,29 @@ export const SectionWithBackgroundColor: Story = {
6868
},
6969
};
7070

71+
72+
export const SectionWithBackgroundColorT: Story = {
73+
args: {
74+
background: sectionBackground.secondary,
75+
padding: 'l',
76+
children: (
77+
<>
78+
<Heading2>This is a section with a background color</Heading2>
79+
<BodyOneText>I'm just a sentence.</BodyOneText>
80+
</>
81+
),
82+
},
83+
play: async ({canvasElement}: {canvasElement: HTMLElement}) => {
84+
const canvas = within(canvasElement);
85+
const heading = canvas.getByText(
86+
'This is a section with a background color',
87+
);
88+
89+
// check if children content is in the section
90+
await expect(heading).toBeInTheDocument();
91+
},
92+
};
93+
7194
export const SectionWithBackgroundPattern: Story = {
7295
args: {
7396
background: sectionBackground.patternPrimary,

frontend/packages/component-library/src/video/stories/Video.story.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,3 @@ export const VideoWithCaptionAndFallback: Story = {
107107
expect(download).toBeVisible();
108108
},
109109
};
110-
export const VideoWithCaptionAndFallbackT: Story = {
111-
args: {
112-
videoTitle: "What Most Schools Don't Teach",
113-
videoFallback:
114-
'https://videos.code.org/social/what-most-schools-dont-teach.mp4',
115-
youTubeId: 'nKIu9yen5nc',
116-
showCaption: true,
117-
},
118-
play: async ({canvasElement}) => {
119-
const canvas = within(canvasElement);
120-
await new Promise(resolve => setTimeout(resolve, 1000));
121-
const video = await canvas.findByTitle("What Most Schools Don't Teach");
122-
const caption = canvas.getByText("What Most Schools Don't Teach");
123-
const download = canvas.getByRole('link');
124-
125-
// check if video is visible
126-
expect(video).toBeVisible();
127-
128-
// check if caption is visible
129-
expect(caption).toBeVisible();
130-
131-
// check if download button is visible
132-
expect(download).toBeVisible();
133-
},
134-
};

0 commit comments

Comments
 (0)