diff --git a/scripts/storybook/src/utils.js b/scripts/storybook/src/utils.js index f850917d68dc97..eaa9344c4e9abc 100644 --- a/scripts/storybook/src/utils.js +++ b/scripts/storybook/src/utils.js @@ -243,7 +243,8 @@ function getPackageStoriesGlob(options) { const storiesGlob = '**/@(index.stories.@(ts|tsx)|*.stories.mdx)'; - // if defined package has stories project use that + // if defined package(project) has stories sibling project, that means we need to look for stories in sibling project as the original project doesn't have stories anymore + // @see https://github.com/microsoft/fluentui/issues/30516 const pkgMetadataStories = projects.get(`${pkgName}-stories`); if (pkgMetadataStories) { acc.push(`${rootOffset}${pkgMetadataStories.root}/src/${storiesGlob}`); diff --git a/scripts/storybook/src/utils.spec.js b/scripts/storybook/src/utils.spec.js index 75c6503ca7a16c..4c20d2809d9c7b 100644 --- a/scripts/storybook/src/utils.spec.js +++ b/scripts/storybook/src/utils.spec.js @@ -235,6 +235,11 @@ describe(`utils`, () => { expect(actual).not.toContain(expect.stringContaining('/react-text/stories/')); }); + + // @TODO: Once we will have at least 1 project migrated to the new structure we can enable/implement this test + it.todo( + `should generate storybook stories string array of glob based on package.json#dependencies field pointing to sibling /stories project if it exists`, + ); }); describe(`#processBabelLoaderOptions`, () => {