File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,12 @@ import { addons } from 'storybook/manager-api';
17
17
import type { API } from 'storybook/manager-api' ;
18
18
import { styled } from 'storybook/theming' ;
19
19
20
- import { A11Y_ADDON_ID , A11Y_PANEL_ID , COMPONENT_TESTING_PANEL_ID } from '../constants' ;
20
+ import {
21
+ A11Y_ADDON_ID ,
22
+ A11Y_PANEL_ID ,
23
+ COMPONENT_TESTING_PANEL_ID ,
24
+ FULL_RUN_TRIGGERS ,
25
+ } from '../constants' ;
21
26
import type { StoreState } from '../types' ;
22
27
import type { StatusValueToStoryIds } from '../use-test-provider-state' ;
23
28
import { Description } from './Description' ;
@@ -322,7 +327,8 @@ export const TestProviderRender: FC<TestProviderRenderProps> = ({
322
327
note = {
323
328
watching
324
329
? 'Unavailable in watch mode'
325
- : currentRun . triggeredBy && currentRun . triggeredBy !== 'global'
330
+ : currentRun . triggeredBy &&
331
+ ! FULL_RUN_TRIGGERS . includes ( currentRun . triggeredBy )
326
332
? 'Unavailable when running focused tests'
327
333
: isRunning
328
334
? 'Testing in progress'
@@ -335,7 +341,8 @@ export const TestProviderRender: FC<TestProviderRenderProps> = ({
335
341
/>
336
342
}
337
343
>
338
- { watching || ( currentRun . triggeredBy && currentRun . triggeredBy !== 'global' ) ? (
344
+ { watching ||
345
+ ( currentRun . triggeredBy && ! FULL_RUN_TRIGGERS . includes ( currentRun . triggeredBy ) ) ? (
339
346
< IconButton size = "medium" disabled >
340
347
< InfoIcon
341
348
aria-label = {
Original file line number Diff line number Diff line change 1
1
import type { StoreOptions } from 'storybook/internal/types' ;
2
2
3
- import type { StoreState } from './types' ;
3
+ import type { RunTrigger , StoreState } from './types' ;
4
4
5
5
export { PANEL_ID as COMPONENT_TESTING_PANEL_ID } from '../../../core/src/component-testing/constants' ;
6
6
export {
@@ -66,6 +66,8 @@ export const storeOptions = {
66
66
} ,
67
67
} satisfies StoreOptions < StoreState > ;
68
68
69
+ export const FULL_RUN_TRIGGERS : RunTrigger [ ] = [ 'global' , 'run-all' ] as const ;
70
+
69
71
export const STORE_CHANNEL_EVENT_NAME = `UNIVERSAL_STORE:${ storeOptions . id } ` ;
70
72
export const STATUS_STORE_CHANNEL_EVENT_NAME = 'UNIVERSAL_STORE:storybook/status' ;
71
73
export const TEST_PROVIDER_STORE_CHANNEL_EVENT_NAME = 'UNIVERSAL_STORE:storybook/test-provider' ;
You can’t perform that action at this time.
0 commit comments