From 5d07b90264f7ac6a7fdda66a70ab9ff7ef58cc3b Mon Sep 17 00:00:00 2001 From: Hvard Bjerke Date: Sat, 2 Nov 2024 13:01:09 +0100 Subject: [PATCH] test: use run command for docker-compose tests --- .storybook/test-runner.ts | 2 +- package.json | 6 +++--- src/components/gpx-hill-map.stories.tsx | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index 47bd1ed..78fdf55 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -45,7 +45,7 @@ const config: TestRunnerConfig = { return; } - if (!storyContext.tags.includes("no-screenshot-test")) { + if (!storyContext.tags.includes("no-visual-test")) { await screenshotTest(page, context); } }, diff --git a/package.json b/package.json index 01c3099..c6fbfbc 100644 --- a/package.json +++ b/package.json @@ -73,9 +73,9 @@ "docker": "docker run --rm -it --user node --mount type=bind,source=\"$(pwd)\",target=/app $(docker build -q .)", "docker:storybook": "npm run docker -- npm run storybook -- --no-open", "docker:compose:storybook": "docker-compose up --build storybook", - "docker:compose:test": "docker-compose up --build test-storybook", - "docker:compose:test:github": "docker-compose up --build test-storybook-github", - "docker:compose:test:update": "docker-compose up --build test-storybook-update", + "docker:compose:test": "docker-compose run test-storybook", + "docker:compose:test:github": "docker-compose run test-storybook-github", + "docker:compose:test:update": "docker-compose run test-storybook-update", "lint:typecheck": "tsc --project tsconfig.lint.json --noEmit", "lint": "npm run lint:typecheck && eslint \"**\"", "lint:fix": "eslint \"**\" --fix", diff --git a/src/components/gpx-hill-map.stories.tsx b/src/components/gpx-hill-map.stories.tsx index 14eab82..bb86520 100644 --- a/src/components/gpx-hill-map.stories.tsx +++ b/src/components/gpx-hill-map.stories.tsx @@ -10,10 +10,13 @@ export default meta; type Story = StoryObj; -export const Default: Story = {}; +export const Default: Story = { + tags: ["no-visual-test"], +}; export const JotunheimenRundt: Story = { args: { gpx: "Jotunheimen_rundt.gpx", }, + tags: ["no-visual-test"], };