diff --git a/code/core/src/core-events/index.ts b/code/core/src/core-events/index.ts index 29c1365d3889..8a1e0a238b8f 100644 --- a/code/core/src/core-events/index.ts +++ b/code/core/src/core-events/index.ts @@ -88,6 +88,8 @@ enum events { TESTING_MODULE_CRASH_REPORT = 'testingModuleCrashReport', TESTING_MODULE_PROGRESS_REPORT = 'testingModuleProgressReport', TESTING_MODULE_RUN_REQUEST = 'testingModuleRunRequest', + /** @deprecated Use TESTING_MODULE_RUN_REQUEST instead */ + TESTING_MODULE_RUN_ALL_REQUEST = 'testingModuleRunAllRequest', TESTING_MODULE_CANCEL_TEST_RUN_REQUEST = 'testingModuleCancelTestRunRequest', TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE = 'testingModuleCancelTestRunResponse', TESTING_MODULE_WATCH_MODE_REQUEST = 'testingModuleWatchModeRequest', @@ -158,6 +160,7 @@ export const { TESTING_MODULE_CRASH_REPORT, TESTING_MODULE_PROGRESS_REPORT, TESTING_MODULE_RUN_REQUEST, + TESTING_MODULE_RUN_ALL_REQUEST, TESTING_MODULE_CANCEL_TEST_RUN_REQUEST, TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE, TESTING_MODULE_WATCH_MODE_REQUEST, diff --git a/code/core/src/manager-api/modules/experimental_testmodule.ts b/code/core/src/manager-api/modules/experimental_testmodule.ts index a6a0eff1d376..15aec353b32a 100644 --- a/code/core/src/manager-api/modules/experimental_testmodule.ts +++ b/code/core/src/manager-api/modules/experimental_testmodule.ts @@ -2,6 +2,7 @@ import { Addon_TypesEnum, type StoryId } from '@storybook/core/types'; import { TESTING_MODULE_CANCEL_TEST_RUN_REQUEST, + TESTING_MODULE_RUN_ALL_REQUEST, TESTING_MODULE_RUN_REQUEST, TESTING_MODULE_WATCH_MODE_REQUEST, type TestProviderId, @@ -93,6 +94,10 @@ export const init: ModuleFn = ({ store, fullAPI }) => { }; fullAPI.emit(TESTING_MODULE_RUN_REQUEST, payload); + + // For backwards compatibility: + fullAPI.emit(TESTING_MODULE_RUN_ALL_REQUEST, { providerId: id }); + return () => api.cancelTestProvider(id); } diff --git a/code/core/src/manager/globals/exports.ts b/code/core/src/manager/globals/exports.ts index 0a8408f0e678..168a936a4880 100644 --- a/code/core/src/manager/globals/exports.ts +++ b/code/core/src/manager/globals/exports.ts @@ -812,6 +812,7 @@ export default { 'TESTING_MODULE_CONFIG_CHANGE', 'TESTING_MODULE_CRASH_REPORT', 'TESTING_MODULE_PROGRESS_REPORT', + 'TESTING_MODULE_RUN_ALL_REQUEST', 'TESTING_MODULE_RUN_REQUEST', 'TESTING_MODULE_WATCH_MODE_REQUEST', 'TOGGLE_WHATS_NEW_NOTIFICATIONS', @@ -876,6 +877,7 @@ export default { 'TESTING_MODULE_CONFIG_CHANGE', 'TESTING_MODULE_CRASH_REPORT', 'TESTING_MODULE_PROGRESS_REPORT', + 'TESTING_MODULE_RUN_ALL_REQUEST', 'TESTING_MODULE_RUN_REQUEST', 'TESTING_MODULE_WATCH_MODE_REQUEST', 'TOGGLE_WHATS_NEW_NOTIFICATIONS', @@ -940,6 +942,7 @@ export default { 'TESTING_MODULE_CONFIG_CHANGE', 'TESTING_MODULE_CRASH_REPORT', 'TESTING_MODULE_PROGRESS_REPORT', + 'TESTING_MODULE_RUN_ALL_REQUEST', 'TESTING_MODULE_RUN_REQUEST', 'TESTING_MODULE_WATCH_MODE_REQUEST', 'TOGGLE_WHATS_NEW_NOTIFICATIONS',