diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--default-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--default-chromium.png index f3567959c..69c1925f3 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--default-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--default-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-generic-error-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-generic-error-chromium.png index 1b2256991..26fb6161f 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-generic-error-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-generic-error-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-light-mode-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-light-mode-chromium.png index f3567959c..69c1925f3 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-light-mode-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-light-mode-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-theme-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-theme-chromium.png index 40f37c3ab..2ecf187a2 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-theme-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-theme-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-timeout-error-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-timeout-error-chromium.png index 370a11920..96feaac9d 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-timeout-error-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-timeout-error-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-validation-error-chromium.png b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-validation-error-chromium.png index d7b93225e..d94ef2a67 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-validation-error-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-create-createcontroller--with-validation-error-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-connect-createsession--default-chromium.png b/packages/keychain/__image_snapshots__/components-connect-createsession--default-chromium.png index 7e2dac90e..014011e97 100644 Binary files a/packages/keychain/__image_snapshots__/components-connect-createsession--default-chromium.png and b/packages/keychain/__image_snapshots__/components-connect-createsession--default-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/components-signmessage--default-chromium.png b/packages/keychain/__image_snapshots__/components-signmessage--default-chromium.png index 118ea55a2..72367eb7e 100644 Binary files a/packages/keychain/__image_snapshots__/components-signmessage--default-chromium.png and b/packages/keychain/__image_snapshots__/components-signmessage--default-chromium.png differ diff --git a/packages/keychain/__image_snapshots__/slot-consent--default-chromium.png b/packages/keychain/__image_snapshots__/slot-consent--default-chromium.png new file mode 100644 index 000000000..6a8c45aef Binary files /dev/null and b/packages/keychain/__image_snapshots__/slot-consent--default-chromium.png differ diff --git a/packages/keychain/package.json b/packages/keychain/package.json index c0962d51a..abb6a867d 100644 --- a/packages/keychain/package.json +++ b/packages/keychain/package.json @@ -16,7 +16,7 @@ "storybook": "storybook dev -p 6001", "storybook:build": "storybook build", "storybook:serve": "pnpm storybook:build --quiet && pnpm http-server -c-1 storybook-static --port 6006 --silent", - "test:storybook:update": "start-server-and-test 'pnpm storybook:serve' 6006 'pnpm test-storybook -u'", + "test-storybook": "test-storybook", "test:storybook": "start-server-and-test 'pnpm storybook:serve' 6006 'pnpm test-storybook'" }, "dependencies": { @@ -102,4 +102,4 @@ "@starknet-react/core": "^3.0.2", "starknet": "^6.11.0" } -} +} \ No newline at end of file diff --git a/packages/keychain/src/components/slot/Consent.stories.tsx b/packages/keychain/src/components/slot/Consent.stories.tsx new file mode 100644 index 000000000..6e706399a --- /dev/null +++ b/packages/keychain/src/components/slot/Consent.stories.tsx @@ -0,0 +1,16 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import { Consent } from "./consent"; + +const meta: Meta = { + title: "Slot/Consent", + component: Consent, + decorators: [(Story) => ], + parameters: { + layout: "centered", + }, +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = {}; diff --git a/packages/ui-next/package.json b/packages/ui-next/package.json index df706a96c..0e3a83915 100644 --- a/packages/ui-next/package.json +++ b/packages/ui-next/package.json @@ -30,6 +30,7 @@ "storybook": "storybook dev -p 6003", "storybook:build": "storybook build", "storybook:serve": "pnpm storybook:build --quiet && pnpm http-server -c-1 storybook-static --port 6007 --silent", + "test-storybook": "test-storybook", "test:storybook:update": "start-server-and-test 'pnpm storybook:serve' 6007 'pnpm test-storybook --url http://127.0.0.1:6007 -u'", "test:storybook": "start-server-and-test 'pnpm storybook:serve' 6007 'pnpm test-storybook --url http://127.0.0.1:6007'" }, diff --git a/scripts/update-storybook-snapshot.sh b/scripts/update-storybook-snapshot.sh index aab810e7e..202df2760 100755 --- a/scripts/update-storybook-snapshot.sh +++ b/scripts/update-storybook-snapshot.sh @@ -1,13 +1,22 @@ #!/bin/bash -# Run the container with all necessary options +# Check for required arguments +if [ "$#" -lt 2 ]; then + echo "Usage: $0 " + echo "Example: $0 @cartridge/keychain 6006" + exit 1 +fi + +PACKAGE=$1 +PORT=$2 + +# Run the test updates in container docker run \ --rm \ + --network="host" \ -v "$(pwd)":/app \ -v /app/node_modules \ --ipc=host \ + -ti \ ghcr.io/cartridge-gg/controller/storybook-env:sha-91a2d36 \ - bash -c " - pnpm install --frozen-lockfile && \ - pnpm test:storybook:update - " + bash -c "pnpm i && pnpm --filter $PACKAGE test-storybook -u --url http://host.docker.internal:$PORT"