Skip to content

Commit

Permalink
missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atabel committed Aug 11, 2023
1 parent 046301b commit 03d6546
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/__screenshot_tests__/bottom-sheet-screenshot-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,19 @@ test.each(TESTABLE_DEVICES)('InfoBottomSheet in %s', async (device) => {

expect(image).toMatchImageSnapshot();
});

test.each(TESTABLE_DEVICES)('ActionsBottomSheet in %s', async (device) => {
const page = await openStoryPage({
id: 'components-modals-bottomsheet--actions',
device,
});

const button = await screen.findByRole('button', {name: 'Open'});
await button.click();

await screen.findByRole('dialog');

const image = await page.screenshot();

expect(image).toMatchImageSnapshot();
});
2 changes: 1 addition & 1 deletion src/bottom-sheet-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type SheetTypeWithPropsUnion = {
[T in SheetType]: SheetTypeWithProps<T>;
}[SheetType];

type NativeSheetImplementation = {
export type NativeSheetImplementation = {
[T in SheetType]: (props: SheetPropsByType[T]) => Promise<SheetResultByType[T]>;
};

Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export {
createNativeSheetImplementationFromWebviewBridge,
showBottomSheet,
} from './bottom-sheet-root';
export type {NativeSheetImplementation} from './bottom-sheet-root';
export {default as StackingGroup} from './stacking-group';

// Forms
Expand Down

0 comments on commit 03d6546

Please sign in to comment.