Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Emit deprecated TESTING_MODULE_RUN_ALL_REQUEST for backward compatibility #29711

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/core/src/core-events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -157,6 +159,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,
Expand Down
5 changes: 5 additions & 0 deletions code/core/src/manager-api/modules/experimental_testmodule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -87,6 +88,10 @@ export const init: ModuleFn<SubAPI, SubState> = ({ store, fullAPI }) => {
indexUrl,
};
fullAPI.emit(TESTING_MODULE_RUN_REQUEST, payload);

// For backwards compatibility:
fullAPI.emit(TESTING_MODULE_RUN_ALL_REQUEST, { providerId: id });

return () => api.cancelTestProvider(id);
}

Expand Down
Loading