Increase storybook pages coverage (#4885)

On FE:
- refreshing metadata mocks
- updating jest tests
- fixing storybook pages coverage
- fixing storybook modules coverage
This commit is contained in:
Charles Bochet
2024-04-17 16:24:04 +02:00
committed by GitHub
parent 6804a90f2f
commit 75fd430149
46 changed files with 13679 additions and 7354 deletions

View File

@ -60,7 +60,11 @@ export const MonthAndYearDropdown = ({
}}
dropdownPlacement="bottom-start"
clickableComponent={
<LightIconButton Icon={IconCalendarDue} size="medium" />
<LightIconButton
testId="month-and-year-dropdown"
Icon={IconCalendarDue}
size="medium"
/>
}
dropdownComponents={
<DropdownMenuItemsContainer>

View File

@ -23,11 +23,16 @@ export const WithOpenMonthSelect: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const monthSelect = canvas.getByText('January');
const monthAndYearButton = await canvas.findByTestId(
'month-and-year-dropdown',
);
await userEvent.click(monthAndYearButton);
const monthSelect = await canvas.findByText('January');
await userEvent.click(monthSelect);
expect(canvas.getAllByText('January')).toHaveLength(2);
[
'February',
'March',