File tree Expand file tree Collapse file tree 2 files changed +23
-25
lines changed
frontend/packages/component-library/src Expand file tree Collapse file tree 2 files changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,29 @@ export const SectionWithBackgroundColor: Story = {
68
68
} ,
69
69
} ;
70
70
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
+
71
94
export const SectionWithBackgroundPattern : Story = {
72
95
args : {
73
96
background : sectionBackground . patternPrimary ,
Original file line number Diff line number Diff line change @@ -107,28 +107,3 @@ export const VideoWithCaptionAndFallback: Story = {
107
107
expect ( download ) . toBeVisible ( ) ;
108
108
} ,
109
109
} ;
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
- } ;
You can’t perform that action at this time.
0 commit comments