@@ -236,6 +236,45 @@ describe('LogoSuite', () => {
236236 expect ( el . classList ) . toContain ( expectedClass )
237237 } )
238238
239+ it ( 'can render a marquee logobar sans-animation using the idle speed option' , ( ) => {
240+ const { container, getByRole} = render (
241+ < LogoSuite >
242+ < LogoSuite . Heading visuallyHidden > { mockHeading } </ LogoSuite . Heading >
243+ < LogoSuite . Logobar marquee marqueeSpeed = "idle" >
244+ < svg data-testid = "svg1" aria-label = "Mock SVG" />
245+ < svg data-testid = "svg2" aria-label = "Mock SVG" />
246+ </ LogoSuite . Logobar >
247+ </ LogoSuite > ,
248+ )
249+
250+ const playButton = getByRole ( 'button' , { name : 'Play animation' } )
251+ expect ( playButton ) . toBeInTheDocument ( )
252+ expect ( container . querySelector ( '.LogoSuite__logobar--paused' ) ) . toBeInTheDocument ( )
253+ } )
254+
255+ it ( 'can start the animation on idle marquee speed settings by pressing the play button' , async ( ) => {
256+ const user = userEvent . setup ( )
257+
258+ const { container, getByRole} = render (
259+ < LogoSuite >
260+ < LogoSuite . Heading visuallyHidden > { mockHeading } </ LogoSuite . Heading >
261+ < LogoSuite . Logobar marquee marqueeSpeed = "idle" >
262+ < svg data-testid = "svg1" aria-label = "Mock SVG" />
263+ < svg data-testid = "svg2" aria-label = "Mock SVG" />
264+ </ LogoSuite . Logobar >
265+ </ LogoSuite > ,
266+ )
267+
268+ const playButtonEl = getByRole ( 'button' , { name : 'Play animation' } )
269+
270+ await user . click ( playButtonEl )
271+
272+ const pauseButtonEl = getByRole ( 'button' , { name : 'Pause animation' } )
273+
274+ expect ( pauseButtonEl ) . toBeInTheDocument ( )
275+ expect ( container . querySelector ( '.LogoSuite__logobar--paused' ) ) . not . toBeInTheDocument ( )
276+ } )
277+
239278 it ( 'renders a pause button when the marquee prop is true' , ( ) => {
240279 const { getByRole} = render (
241280 < LogoSuite >
0 commit comments