Skip to content

Commit

Permalink
update screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Nov 11, 2024
1 parent 700f0df commit c4331e6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 27 additions & 22 deletions src/__screenshot_tests__/accordion-screenshot-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,36 @@ test.each`
);

test.each`
detail | right
${''} | ${false}
${''} | ${true}
${'Detail'} | ${false}
${'Detail'} | ${true}
`('Accordion. detail($detail) right($right)', async ({detail, right}) => {
await openStoryPage({
id: 'components-accordions--accordion-story',
device: 'MOBILE_IOS',
args: {
detail,
right,
},
});
detail | right | overInverse
${''} | ${false} | ${false}
${''} | ${true} | ${false}
${'Detail'} | ${false} | ${false}
${'Detail'} | ${true} | ${false}
${'Detail'} | ${true} | ${true}
`(
'Accordion. detail($detail) right($right) overInverse($overInverse)',
async ({detail, right, overInverse}) => {
await openStoryPage({
id: 'components-accordions--accordion-story',
device: 'MOBILE_IOS',
args: {
detail,
right,
overInverse,
},
});

const accordion = await screen.findByTestId('accordion');
const accordion = await screen.findByTestId('accordion');

await (await screen.findByTestId('accordion-item-1')).click();
await (await screen.findByTestId('accordion-item-1')).click();
await (await screen.findByTestId('accordion-item-2')).click();
await (await screen.findByTestId('accordion-item-4')).click();
await (await screen.findByTestId('accordion-item-6')).click();
await (await screen.findByTestId('accordion-item-1')).click();
await (await screen.findByTestId('accordion-item-1')).click();
await (await screen.findByTestId('accordion-item-2')).click();
await (await screen.findByTestId('accordion-item-4')).click();
await (await screen.findByTestId('accordion-item-6')).click();

expect(await accordion.screenshot()).toMatchImageSnapshot();
});
expect(await accordion.screenshot()).toMatchImageSnapshot();
}
);

test.each`
detail | right
Expand Down

0 comments on commit c4331e6

Please sign in to comment.