-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a61c972
commit 62b1f3a
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
cl2-component-library/src/components/LateralScrollControls/LateralScrollControls.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { render, screen } from '../../utils/testUtils/rtl'; | ||
import LateralScrollControls from '.'; | ||
import Box from '../Box'; | ||
|
||
describe('<LateralScrollControls />', () => { | ||
it('renders', () => { | ||
const containerRef = React.createRef<HTMLDivElement>(); | ||
|
||
render( | ||
<LateralScrollControls containerRef={containerRef}> | ||
<Box | ||
display="flex" | ||
width="200px" | ||
height="auto" | ||
gap="16px" | ||
flexDirection="row" | ||
flexWrap="nowrap" | ||
overflow="auto" | ||
overflowX="scroll" | ||
py="24px" | ||
ref={containerRef} | ||
> | ||
<Box width="200px">Element 1</Box> | ||
<Box width="200px">Element 2</Box> | ||
<Box width="200px">Element 3</Box> | ||
<Box width="200px">Element 4</Box> | ||
<Box width="200px">Element 5</Box> | ||
</Box> | ||
</LateralScrollControls> | ||
); | ||
|
||
expect( | ||
screen.getByTestId('event-previews-scroll-left') | ||
).toBeInTheDocument(); | ||
expect( | ||
screen.getByTestId('event-previews-scroll-right') | ||
).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters