Storybook Interaction Play Function Global Timeout Configuration
0 reputation · 24 May 2025, 07:00 UTC
The goal is to introduce a configurable global timeout that applies to the entire play sequence in Storybook's Interaction Testing, reducing flakiness caused by unpredictable DOM update times.
Currently each asynchronous action relies on the default timeout of the underlying testing‑library wrapper, and there is no built‑in mechanism to override this globally or to define a cancellation policy when the limit is exceeded. This leaves teams uncertain about how to enforce uniform timing bounds across stories and how Storybook should react when a timeout occurs.
What API could be added to set a global timeout for all play functions? How should Storybook handle cancellation and cleanup when the timeout is reached? Should the timeout be adjustable at the project level, per‑story, or both?