-
Notifications
You must be signed in to change notification settings - Fork 11
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
Pedro Ladaria
committed
Dec 19, 2024
1 parent
fda0071
commit 1fadd9c
Showing
10 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+28.6 KB
...t-tsx-drawer-desktop-actions-false-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.4 KB
...st-tsx-drawer-desktop-actions-true-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.9 KB
...sx-drawer-mobile-ios-actions-false-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.2 KB
...sx-drawer-mobile-ios-actions-true-dismissible-false-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.6 KB
...tsx-drawer-mobile-ios-actions-true-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.6 KB
...tsx-drawer-mobile-ios-actions-true-dismissible-true-content-length-5-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23 KB
...st-tsx-drawer-tablet-actions-false-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.4 KB
...est-tsx-drawer-tablet-actions-true-dismissible-true-content-length-1-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
import {openStoryPage, screen} from '../test-utils'; | ||
|
||
import type {Device} from '../test-utils'; | ||
|
||
test.each` | ||
device | withActions | dismissible | contentLength | ||
${'MOBILE_IOS'} | ${true} | ${true} | ${1} | ||
${'MOBILE_IOS'} | ${true} | ${true} | ${5} | ||
${'MOBILE_IOS'} | ${true} | ${false} | ${1} | ||
${'DESKTOP'} | ${true} | ${true} | ${1} | ||
${'TABLET'} | ${true} | ${true} | ${1} | ||
${'MOBILE_IOS'} | ${false} | ${true} | ${1} | ||
${'DESKTOP'} | ${false} | ${true} | ${1} | ||
${'TABLET'} | ${false} | ${true} | ${1} | ||
`( | ||
'Drawer $device actions:$withActions dismissible:$dismissible contentLength:$contentLength', | ||
async ({device, withActions, dismissible}) => { | ||
const page = await openStoryPage({ | ||
id: 'components-modals-drawer--default', | ||
device: device as Device, | ||
args: { | ||
showButton: withActions, | ||
showSecondaryButton: withActions, | ||
showButtonLink: withActions, | ||
onDismissHandler: dismissible, | ||
}, | ||
}); | ||
|
||
const button = await screen.findByRole('button', {name: 'Open Drawer'}); | ||
await button.click(); | ||
|
||
const image = await page.screenshot(); | ||
expect(image).toMatchImageSnapshot(); | ||
} | ||
); |
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