-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
113 changed files
with
639 additions
and
64 deletions.
There are no files selected for viewing
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
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
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,33 @@ | ||
import { TestRunnerConfig, waitForPageReady } from "@storybook/test-runner"; | ||
import { toMatchImageSnapshot } from "jest-image-snapshot"; | ||
import path from "path"; | ||
|
||
const customSnapshotsDir = path.join(process.cwd(), "__image_snapshots__"); | ||
|
||
const config: TestRunnerConfig = { | ||
setup() { | ||
expect.extend({ toMatchImageSnapshot }); | ||
}, | ||
async postVisit(page, context) { | ||
// Wait for the page to be ready before taking a screenshot | ||
await waitForPageReady(page); | ||
|
||
// Wait an extra second for transitions to complete | ||
await page.waitForTimeout(1000); | ||
|
||
// Get browser name to handle different browsers if needed | ||
const browserName = | ||
page.context().browser()?.browserType().name() ?? "unknown"; | ||
|
||
const image = await page.screenshot(); | ||
expect(image).toMatchImageSnapshot({ | ||
customSnapshotsDir, | ||
customSnapshotIdentifier: `${context.id}-${browserName}`, | ||
// Add some threshold to handle minor rendering differences | ||
failureThreshold: 0.01, | ||
failureThresholdType: "percent", | ||
}); | ||
}, | ||
}; | ||
|
||
export default config; |
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 @@ | ||
__diff_output__ |
Binary file added
BIN
+22.4 KB
...eychain/__image_snapshots__/components-confirmtransaction--default-chromium.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.3 KB
...chain/__image_snapshots__/components-connect-authenticate--default-chromium.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
+29.9 KB
...ge_snapshots__/components-connect-create-createcontroller--default-chromium.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
+30.7 KB
...s__/components-connect-create-createcontroller--with-generic-error-chromium.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
+29.9 KB
...hots__/components-connect-create-createcontroller--with-light-mode-chromium.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
+92.8 KB
...snapshots__/components-connect-create-createcontroller--with-theme-chromium.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
+36.8 KB
...s__/components-connect-create-createcontroller--with-timeout-error-chromium.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
+32.8 KB
.../components-connect-create-createcontroller--with-validation-error-chromium.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
+40.7 KB
...hain/__image_snapshots__/components-connect-createsession--default-chromium.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
+68.5 KB
.../__image_snapshots__/components-connect-createsession--with-preset-chromium.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.9 KB
...s/keychain/__image_snapshots__/components-connect-upgrade--default-chromium.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
+44.2 KB
.../keychain/__image_snapshots__/components-controllererroralert--all-chromium.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.2 KB
.../keychain/__image_snapshots__/components-deploycontroller--default-chromium.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
+19 KB
packages/keychain/__image_snapshots__/components-erroralert--default-chromium.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
+19.1 KB
packages/keychain/__image_snapshots__/components-erroralert--error-chromium.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
+19.4 KB
packages/keychain/__image_snapshots__/components-erroralert--info-chromium.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
+20.6 KB
...ges/keychain/__image_snapshots__/components-erroralert--long-title-chromium.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
+19.3 KB
packages/keychain/__image_snapshots__/components-erroralert--warning-chromium.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
+27.7 KB
packages/keychain/__image_snapshots__/components-errorpage--default-chromium.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
+40.3 KB
...ages/keychain/__image_snapshots__/components-errorpage--long-error-chromium.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
+26.5 KB
packages/keychain/__image_snapshots__/components-failure--default-chromium.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
+18.5 KB
packages/keychain/__image_snapshots__/components-funding--default-chromium.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
+13.6 KB
..._snapshots__/components-layout-container-header-banner--compressed-chromium.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
+20 KB
...ge_snapshots__/components-layout-container-header-banner--expanded-chromium.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
+12.6 KB
packages/keychain/__image_snapshots__/components-pending--default-chromium.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
+9.12 KB
packages/keychain/__image_snapshots__/components-settings--default-chromium.png
Oops, something went wrong.
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
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,30 @@ | ||
import { TestRunnerConfig, waitForPageReady } from "@storybook/test-runner"; | ||
import { toMatchImageSnapshot } from "jest-image-snapshot"; | ||
import path from "path"; | ||
|
||
const customSnapshotsDir = path.join(process.cwd(), "__image_snapshots__"); | ||
|
||
const config: TestRunnerConfig = { | ||
setup() { | ||
expect.extend({ toMatchImageSnapshot }); | ||
}, | ||
async postVisit(page, context) { | ||
// Wait for the page to be ready before taking a screenshot | ||
await waitForPageReady(page); | ||
|
||
// Get browser name to handle different browsers if needed | ||
const browserName = | ||
page.context().browser()?.browserType().name() ?? "unknown"; | ||
|
||
const image = await page.screenshot(); | ||
expect(image).toMatchImageSnapshot({ | ||
customSnapshotsDir, | ||
customSnapshotIdentifier: `${context.id}-${browserName}`, | ||
// Add some threshold to handle minor rendering differences | ||
failureThreshold: 0.01, | ||
failureThresholdType: "percent", | ||
}); | ||
}, | ||
}; | ||
|
||
export default config; |
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 @@ | ||
__diff_output__ |
Oops, something went wrong.
Binary file added
BIN
+10.6 KB
packages/ui-next/__image_snapshots__/alert--alert-destructive-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+8.37 KB
packages/ui-next/__image_snapshots__/breadcrumb--custom-separator-chromium.png
Oops, something went wrong.
Binary file added
BIN
+8.36 KB
packages/ui-next/__image_snapshots__/breadcrumb--default-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+13.3 KB
packages/ui-next/__image_snapshots__/colors--destructive-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+11.8 KB
...es/ui-next/__image_snapshots__/components-primitives-form--default-chromium.png
Oops, something went wrong.
Binary file added
BIN
+5.88 KB
packages/ui-next/__image_snapshots__/copyaddress--default-chromium.png
Oops, something went wrong.
Binary file added
BIN
+5.86 KB
packages/ui-next/__image_snapshots__/copyaddress--explicit-length-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+5.43 KB
packages/ui-next/__image_snapshots__/dialog--alert-dialog-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+5.43 KB
packages/ui-next/__image_snapshots__/dropdown-menu--default-chromium.png
Oops, something went wrong.
Binary file added
BIN
+5.25 KB
packages/ui-next/__image_snapshots__/hover-card--default-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+7.9 KB
packages/ui-next/__image_snapshots__/radio-group--default-chromium.png
Oops, something went wrong.
Binary file added
BIN
+35.7 KB
packages/ui-next/__image_snapshots__/scroll-area--default-chromium.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+5.16 KB
packages/ui-next/__image_snapshots__/toggle-group--default-chromium.png
Oops, something went wrong.
Oops, something went wrong.
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
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
Oops, something went wrong.