[AAE-10105] Update Storybook to 6.5.10v (#7765)

* [AAE-10266] storybook 6.4.19 fix

* [AAE-10266] test storybook config

* [AAE-10266] Fix storybook config

* downgrade nrwl workspace to previous version

* remove duplicated logo

* downgrade nrwl version

* downgrade nrwl packages

* Trigger travis

* fix playwright config

* Fix storybook execute command

* Fix Playwright config v2

* Remove useless command

Co-authored-by: MichalFidor <michal.fidor@hyland.com>
This commit is contained in:
Tomasz Gnyp 2022-08-16 14:14:02 +02:00 committed by GitHub
parent 26c46cfb9d
commit be0545801d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1518 additions and 2165 deletions

View File

@ -1,8 +1,9 @@
import { create } from '@storybook/theming'; import { create } from '@storybook/theming';
import alfrescoLogo from '../lib/core/assets/images/alfresco-logo.svg';
export default create({ export default create({
base: 'light', base: 'light',
brandTitle: 'Hyland | Alfresco Storybook App', brandTitle: 'Hyland | Alfresco Storybook App',
brandUrl: 'https://www.alfresco.com/', brandUrl: 'https://www.alfresco.com/',
brandImage: '/assets/storybook-logo.png', brandImage: alfrescoLogo,
}); });

View File

@ -1,11 +1,7 @@
module.exports = { module.exports = {
stories: [], stories: [],
addons: ['@storybook/addon-essentials'], addons: ['@storybook/addon-essentials'],
// uncomment the property below if you want to apply some webpack config globally framework: '@storybook/angular',
// webpackFinal: async (config, { configType }) => { staticDirs: [ { from: '../../../demo-shell/src/app.config.json', to: 'app.config.json' } ],
// // Make whatever fine-grained changes you need that should apply to all storybook configs core: { builder: 'webpack5' }
// // Return the altered config
// return config;
// },
}; };

View File

@ -133,7 +133,7 @@ jobs:
script: script:
# Build Demo shell & Storybook for production docker" # Build Demo shell & Storybook for production docker"
- NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production - NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production
- NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci --projectBuildConfig=stories:build-storybook - NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci
- ./scripts/travis/release/release-docker.sh - ./scripts/travis/release/release-docker.sh
workspaces: workspaces:
create: create:

View File

@ -436,13 +436,19 @@
} }
}, },
"storybook": { "storybook": {
"builder": "@nrwl/storybook:storybook", "builder": "@storybook/angular:start-storybook",
"options": { "options": {
"uiFramework": "@storybook/angular",
"port": 4400, "port": 4400,
"config": { "browserTarget": "core:storybook",
"configFolder": "lib/core/.storybook" "configDir": "lib/core/.storybook",
} "compodoc": false,
"styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -451,16 +457,19 @@
} }
}, },
"build-storybook": { "build-storybook": {
"builder": "@nrwl/storybook:build", "builder": "@storybook/angular:build-storybook",
"outputs": [
"{options.outputPath}"
],
"options": { "options": {
"uiFramework": "@storybook/angular", "browserTarget": "core:build-storybook",
"outputPath": "dist/storybook/core", "configDir": "lib/core/.storybook",
"config": { "outputDir": "dist/storybook/core",
"configFolder": "lib/core/.storybook" "compodoc": false,
} "styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -508,13 +517,19 @@
} }
}, },
"storybook": { "storybook": {
"builder": "@nrwl/storybook:storybook", "builder": "@storybook/angular:start-storybook",
"options": { "options": {
"uiFramework": "@storybook/angular",
"port": 4400, "port": 4400,
"config": { "browserTarget": "content-services:storybook",
"configFolder": "lib/content-services/.storybook" "configDir": "lib/content-services/.storybook",
} "compodoc": false,
"styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -523,16 +538,19 @@
} }
}, },
"build-storybook": { "build-storybook": {
"builder": "@nrwl/storybook:build", "builder": "@storybook/angular:build-storybook",
"outputs": [
"{options.outputPath}"
],
"options": { "options": {
"uiFramework": "@storybook/angular", "browserTarget": "content-services:build-storybook",
"outputPath": "dist/storybook/content-services", "configDir": "lib/content-services/.storybook",
"config": { "outputDir": "dist/storybook/content-services",
"configFolder": "lib/content-services/.storybook" "compodoc": false,
} "styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -619,13 +637,19 @@
} }
}, },
"storybook": { "storybook": {
"builder": "@nrwl/storybook:storybook", "builder": "@storybook/angular:start-storybook",
"options": { "options": {
"uiFramework": "@storybook/angular",
"port": 4400, "port": 4400,
"config": { "browserTarget": "process-services-cloud:storybook",
"configFolder": "lib/process-services-cloud/.storybook" "configDir": "lib/process-services-cloud/.storybook",
} "compodoc": false,
"styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -634,16 +658,19 @@
} }
}, },
"build-storybook": { "build-storybook": {
"builder": "@nrwl/storybook:build", "builder": "@storybook/angular:build-storybook",
"outputs": [
"{options.outputPath}"
],
"options": { "options": {
"uiFramework": "@storybook/angular", "browserTarget": "process-services-cloud:build-storybook",
"outputPath": "dist/storybook/process-services-cloud", "configDir": "lib/process-services-cloud/.storybook",
"config": { "outputDir": "dist/storybook/process-services-cloud",
"configFolder": "lib/process-services-cloud/.storybook" "compodoc": false,
} "styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -808,13 +835,19 @@
"projectType": "library", "projectType": "library",
"architect": { "architect": {
"storybook": { "storybook": {
"builder": "@nrwl/storybook:storybook", "builder": "@storybook/angular:start-storybook",
"options": { "options": {
"uiFramework": "@storybook/angular",
"port": 4400, "port": 4400,
"config": { "browserTarget": "stories:storybook",
"configFolder": "lib/stories/.storybook" "configDir": "lib/stories/.storybook",
} "compodoc": false,
"styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {
@ -823,16 +856,19 @@
} }
}, },
"build-storybook": { "build-storybook": {
"builder": "@nrwl/storybook:build", "builder": "@storybook/angular:build-storybook",
"outputs": [
"{options.outputPath}"
],
"options": { "options": {
"uiFramework": "@storybook/angular", "browserTarget": "stories:build-storybook",
"outputPath": "dist/storybook/stories", "configDir": "lib/stories/.storybook",
"config": { "outputDir": "dist/storybook/stories",
"configFolder": "lib/stories/.storybook" "compodoc": false,
} "styles": [
"demo-shell/src/assets/fonts/material-icons/material-icons.css",
"demo-shell/src/assets/fonts/muli/muli.css",
"demo-shell/src/styles.scss",
"demo-shell/src/custom-style-dev.scss",
"node_modules/cropperjs/dist/cropper.min.css"
]
}, },
"configurations": { "configurations": {
"ci": { "ci": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

View File

@ -7,8 +7,8 @@
* agreement is prohibited. * agreement is prohibited.
*/ */
import { PlaywrightTestConfig, ReporterDescription, WebServerConfig } from '@playwright/test'; import { PlaywrightTestConfig, ReporterDescription } from '@playwright/test';
import { dotenvConfig } from '@alfresco/adf-cli/tooling'; import { dotenvConfig } from '../lib/cli/tooling';
import { paths } from './utils/paths'; import { paths } from './utils/paths';
import { timeouts } from './utils/timeouts'; import { timeouts } from './utils/timeouts';
import path from 'path'; import path from 'path';
@ -28,8 +28,8 @@ export const getGlobalConfig = (): PlaywrightTestConfig => {
report = ['html', { outputFolder: path.resolve(`../${paths.report}`), open: 'on-failure' }]; report = ['html', { outputFolder: path.resolve(`../${paths.report}`), open: 'on-failure' }];
} }
const webServer: WebServerConfig = { const webServer = {
command: startCommand, command: `cd .. && ${startCommand}`,
// It's true, but watch on on localhost! If you'll have other app up and running then it'll use this app to run the tests. // It's true, but watch on on localhost! If you'll have other app up and running then it'll use this app to run the tests.
// It won't check what application is currently running. // It won't check what application is currently running.
reuseExistingServer: true, reuseExistingServer: true,
@ -53,7 +53,7 @@ export const getGlobalConfig = (): PlaywrightTestConfig => {
retries: env.CI ? 2 : 0, retries: env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */ /* Opt out of parallel tests on CI. */
workers: env.PLAYWRIGHT_WORKERS ? parseInt(env.PLAYWRIGHT_WORKERS, 0) : 1, workers: env.PLAYWRIGHT_WORKERS ? parseInt(env.PLAYWRIGHT_WORKERS, 10) : 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['list'], report], reporter: [['list'], report],

View File

@ -12,6 +12,6 @@ export const timeouts = {
medium: 5000, medium: 5000,
large: 10000, large: 10000,
globalTest: 30 * 1000, globalTest: 30 * 1000,
webServer: 120 * 1000, webServer: 240 * 1000,
globalSpec: 60 * 10 * 1000 globalSpec: 60 * 10 * 1000
}; };

View File

@ -1,26 +1,15 @@
const rootMain = require('../../../.storybook/main'); const rootMain = require('../../../.storybook/main');
module.exports = { module.exports = {
...rootMain, ...rootMain,
core: { ...rootMain.core, builder: 'webpack5' },
core: { ...rootMain.core, builder: 'webpack4' },
stories: [ stories: [
...rootMain.stories, ...rootMain.stories,
'../**/*.stories.@(js|jsx|ts|tsx)' '../**/*.stories.@(js|jsx|ts|tsx)'
], ],
addons: [...rootMain.addons ], staticDirs: [
webpackFinal: async (config, { configType }) => { ...rootMain.staticDirs,
// apply any global webpack configs that might have been specified in .storybook/main.js { from: __dirname + '/../src/lib/i18n', to: 'assets/adf-content-services/i18n' }
if (rootMain.webpackFinal) { ],
config = await rootMain.webpackFinal(config, { configType }); addons: [...rootMain.addons ]
}
// add your own webpack tweaks if needed
return config;
},
}; };

View File

@ -1,26 +1,16 @@
const rootMain = require('../../../.storybook/main'); const rootMain = require('../../../.storybook/main');
module.exports = { module.exports = {
...rootMain, ...rootMain,
core: { ...rootMain.core, builder: 'webpack5' }, core: { ...rootMain.core, builder: 'webpack5' },
stories: [ stories: [
...rootMain.stories, ...rootMain.stories,
'../**/*.stories.@(js|jsx|ts|tsx)' '../**/*.stories.@(js|jsx|ts|tsx)'
], ],
addons: [...rootMain.addons ], staticDirs: [
webpackFinal: async (config, { configType }) => { ...rootMain.staticDirs,
// apply any global webpack configs that might have been specified in .storybook/main.js { from: __dirname + '/../i18n', to: 'assets/adf-core/i18n' },
if (rootMain.webpackFinal) { { from: __dirname + '/../assets/images', to: 'assets/images' }
config = await rootMain.webpackFinal(config, { configType }); ],
} addons: [...rootMain.addons ]
// add your own webpack tweaks if needed
return config;
},
}; };

View File

@ -1,26 +1,16 @@
const rootMain = require('../../../.storybook/main'); const rootMain = require('../../../.storybook/main');
module.exports = { module.exports = {
...rootMain, ...rootMain,
core: { ...rootMain.core, builder: 'webpack5' }, core: { ...rootMain.core, builder: 'webpack5' },
stories: [ stories: [
...rootMain.stories, ...rootMain.stories,
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)' '../src/lib/**/*.stories.@(js|jsx|ts|tsx)'
], ],
addons: [...rootMain.addons ], staticDirs: [
webpackFinal: async (config, { configType }) => { ...rootMain.staticDirs,
// apply any global webpack configs that might have been specified in .storybook/main.js { from: '../../core/i18n', to: 'assets/adf-core/i18n' },
if (rootMain.webpackFinal) { { from: __dirname + '/../src/lib/i18n', to: 'assets/adf-process-services-cloud/i18n' }
config = await rootMain.webpackFinal(config, { configType }); ],
} addons: [...rootMain.addons ]
// add your own webpack tweaks if needed
return config;
},
}; };

View File

@ -1,28 +1,20 @@
const rootMain = require('../../../.storybook/main'); const rootMain = require('../../../.storybook/main');
module.exports = { module.exports = {
...rootMain, ...rootMain,
core: { ...rootMain.core, builder: 'webpack5' }, core: { ...rootMain.core, builder: 'webpack5' },
stories: [ stories: [
...rootMain.stories, ...rootMain.stories,
'../../core/**/*.stories.@(js|jsx|ts|tsx)', '../../core/**/*.stories.@(js|jsx|ts|tsx)',
'../../content-services/**/*.stories.@(js|jsx|ts|tsx)', '../../content-services/**/*.stories.@(js|jsx|ts|tsx)',
'../../process-services-cloud/**/*.stories.@(js|jsx|ts|tsx)' '../../process-services-cloud/**/*.stories.@(js|jsx|ts|tsx)'
], ],
addons: [...rootMain.addons ], staticDirs: [
webpackFinal: async (config, { configType }) => { ...rootMain.staticDirs,
// apply any global webpack configs that might have been specified in .storybook/main.js { from: '../../core/i18n', to: 'assets/adf-core/i18n' },
if (rootMain.webpackFinal) { { from: '../../core/assets/images', to: 'assets/images' },
config = await rootMain.webpackFinal(config, { configType }); { from: '../../content-services/src/lib/i18n', to: 'assets/adf-content-services/i18n' },
} { from: '../../process-services-cloud/src/lib/i18n', to: 'assets/adf-process-services-cloud/i18n' },
],
addons: [...rootMain.addons ]
// add your own webpack tweaks if needed
return config;
},
}; };

3401
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -134,12 +134,12 @@
"@nrwl/storybook": "13.10.5", "@nrwl/storybook": "13.10.5",
"@nrwl/workspace": "13.10.5", "@nrwl/workspace": "13.10.5",
"@paperist/types-remark": "0.1.3", "@paperist/types-remark": "0.1.3",
"@playwright/test": "^1.20.0", "@playwright/test": "^1.25.0",
"@quanzo/change-font-size": "1.0.0", "@quanzo/change-font-size": "1.0.0",
"@storybook/addon-essentials": "6.4.19", "@storybook/addon-essentials": "6.5.10",
"@storybook/angular": "6.4.19", "@storybook/angular": "6.5.10",
"@storybook/builder-webpack5": "6.4.19", "@storybook/builder-webpack5": "6.5.10",
"@storybook/manager-webpack5": "6.4.19", "@storybook/manager-webpack5": "6.5.10",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.2", "@types/jasminewd2": "~2.0.2",
"@types/minimatch": "^3.0.3", "@types/minimatch": "^3.0.3",
@ -190,6 +190,7 @@
"ng-mocks": "^10.5.4", "ng-mocks": "^10.5.4",
"ng-packagr": "^13.2.1", "ng-packagr": "^13.2.1",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"nx": "13.10.5",
"postcss": "^8.4.5", "postcss": "^8.4.5",
"postcss-sass": "^0.5.0", "postcss-sass": "^0.5.0",
"protractor": "^7.0.0", "protractor": "^7.0.0",

View File

@ -4,5 +4,4 @@
sudo sysctl -w fs.inotify.max_user_watches=524288 sudo sysctl -w fs.inotify.max_user_watches=524288
# Run Playwright Storybook Tests # Run Playwright Storybook Tests
# NOTE: Test excluded due to Storybook not generating properly - https://alfresco.atlassian.net/browse/AAE-8048 npx playwright test --config='e2e-playwright/playwright.config.ts' || exit 1
#npx playwright test --config='e2e-playwright/playwright.config.ts' || exit 1