Skip to content

Commit

Permalink
Add dark storybook snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Sep 15, 2024
1 parent f1458df commit afe26ab
Show file tree
Hide file tree
Showing 95 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/test/playwright/utils/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const makeBreakpointDescribe =
options = {}
) => {
const snapshotName = getSnapshotName(name, options.dir)
// TODO: Remove after the Playwright VR dark mode snapshots are added
options.useColorMode = false
return innerExpectSnapshot(page, snapshotName, screenshotAble, options)
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/test/playwright/utils/expect-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const expectSnapshot: ExpectSnapshot = async (
page,
name,
screenshotAble,
{ screenshotOptions, snapshotOptions, useColorMode, dir } = {}
{ screenshotOptions, snapshotOptions, useColorMode = true, dir } = {}
) => {
// Hide the theme switcher before taking the screenshot.
screenshotOptions = {
Expand All @@ -88,7 +88,7 @@ export const expectSnapshot: ExpectSnapshot = async (
.soft(await screenshotAble.screenshot(screenshotOptions))
.toMatchSnapshot(getSnapshotName(name, "light"), snapshotOptions)

if (!(useColorMode === true)) {
if (!useColorMode) {
return
}
await turnOnDarkMode(page, dir ?? "ltr")
Expand Down
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit afe26ab

Please sign in to comment.