diff --git a/code/addons/test/package.json b/code/addons/test/package.json index ca52df1494d3..4a158133de8b 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -70,7 +70,8 @@ "prep": "jiti ../../../scripts/prepare/addon-bundle.ts" }, "dependencies": { - "@storybook/csf": "^0.1.11" + "@storybook/csf": "^0.1.11", + "@storybook/icons": "^1.2.10" }, "devDependencies": { "@types/semver": "^7", diff --git a/code/addons/test/src/constants.ts b/code/addons/test/src/constants.ts index d0a3762620c9..ebc63021f0a4 100644 --- a/code/addons/test/src/constants.ts +++ b/code/addons/test/src/constants.ts @@ -1 +1,2 @@ -export const ADDON_ID = 'storybook/vitest'; +export const ADDON_ID = 'storybook/test'; +export const TEST_PROVIDER_ID = `${ADDON_ID}/test-provider`; diff --git a/code/addons/test/src/manager.tsx b/code/addons/test/src/manager.tsx index 8d706325046a..b7744659eff5 100644 --- a/code/addons/test/src/manager.tsx +++ b/code/addons/test/src/manager.tsx @@ -1,5 +1,17 @@ -import { type API, addons } from 'storybook/internal/manager-api'; +import React from 'react'; -import { ADDON_ID } from './constants'; +import { addons } from 'storybook/internal/manager-api'; +import { Addon_TypesEnum } from 'storybook/internal/types'; -addons.register(ADDON_ID, () => {}); +import { PointerHandIcon } from '@storybook/icons'; + +import { ADDON_ID, TEST_PROVIDER_ID } from './constants'; + +addons.register(ADDON_ID, () => { + addons.add(TEST_PROVIDER_ID, { + type: Addon_TypesEnum.experimental_TEST_PROVIDER, + icon: , + title: 'Component tests', + description: () => 'Not yet run', + }); +}); diff --git a/code/yarn.lock b/code/yarn.lock index 80ebe411b341..bb28a7bf8772 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6239,6 +6239,7 @@ __metadata: resolution: "@storybook/experimental-addon-test@workspace:addons/test" dependencies: "@storybook/csf": "npm:^0.1.11" + "@storybook/icons": "npm:^1.2.10" "@types/semver": "npm:^7" "@vitest/browser": "npm:^2.0.0" boxen: "npm:^8.0.1"