Addresses issue #1906 (#2074)

* refactored Storybook UI

* refactored Storybook UI

* removed extra cards from the doc, added card for ui components

* added hover behavior to doc page & made it look selected

* separate storybook docs and tests

* separating storybook tests and docs
This commit is contained in:
Nimra Ahmed
2023-10-17 01:06:07 +05:00
committed by GitHub
parent d64f167b3b
commit a6542719df
5 changed files with 27 additions and 10 deletions

View File

@ -1,7 +1,7 @@
const path = require('path');
computeStoriesGlob = () => {
if (process.env.STORYBOOK_STORIES_FOLDER === 'pages') {
if (process.env.STORYBOOK_SCOPE === 'pages') {
return [
'../src/pages/**/*.stories.@(js|jsx|ts|tsx)',
'../src/__stories__/*.stories.@(js|jsx|ts|tsx)',
@ -10,10 +10,14 @@ computeStoriesGlob = () => {
]
}
if (process.env.STORYBOOK_STORIES_FOLDER === 'modules') {
if (process.env.STORYBOOK_SCOPE === 'modules') {
return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)', '../src/modules/**/*.docs.mdx']
}
if (process.env.STORYBOOK_SCOPE === 'ui-docs') {
return ['../src/modules/ui/**/*.docs.mdx'];
}
return ['../src/**/*.stories.@(js|jsx|ts|tsx)', '../src/**/*.docs.mdx']
};

View File

@ -9,5 +9,5 @@ module.exports = {
/** Add your own overrides below
* @see https://jestjs.io/docs/configuration
*/
testTimeout: process.env.STORYBOOK_STORIES_FOLDER === 'pages' ? 60000 : 15000,
testTimeout: process.env.STORYBOOK_SCOPE=== 'pages' ? 60000 : 15000,
};