File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ export const PausePlay: Story = {
64
64
65
65
export const UnmuteMute : Story = {
66
66
...Default ,
67
+ parameters : {
68
+ test : {
69
+ // The following error is received without this flag: "TypeError: ophan.trackClickComponentEvent is not a function"
70
+ dangerouslyIgnoreUnhandledErrors : true ,
71
+ } ,
72
+ } ,
67
73
play : async ( { canvasElement } ) => {
68
74
const canvas = within ( canvasElement ) ;
69
75
@@ -94,13 +100,13 @@ export const InteractionObserver: Story = {
94
100
play : async ( { canvasElement } ) => {
95
101
const canvas = within ( canvasElement ) ;
96
102
97
- await sleep ( 300 ) ;
103
+ await sleep ( 300 ) ; // Allow enough time for the autoplay video to start.
98
104
canvas . getByTestId ( 'page-end' ) . scrollIntoView ( ) ;
99
105
100
106
const progressBar = await canvas . findByRole ( 'progressbar' ) ;
101
107
const progress = Number ( progressBar . ariaValueNow ) ;
102
108
103
- await sleep ( 300 ) ;
109
+ await sleep ( 200 ) ; // Allow enough time to be confident that the video is paused.
104
110
await expect ( Number ( progressBar . ariaValueNow ) ) . toEqual ( progress ) ;
105
111
await expect ( canvas . queryByTestId ( 'play-icon' ) ) . not . toBeInTheDocument ( ) ;
106
112
} ,
You can’t perform that action at this time.
0 commit comments