[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 alfrescoLogo from '../lib/core/assets/images/alfresco-logo.svg';
export default create({
base: 'light',
brandTitle: 'Hyland | Alfresco Storybook App',
brandUrl: 'https://www.alfresco.com/',
brandImage: '/assets/storybook-logo.png',
brandImage: alfrescoLogo,
});

View File

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

View File

@ -133,7 +133,7 @@ jobs:
script:
# 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 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
workspaces:
create:

View File

@ -436,13 +436,19 @@
}
},
"storybook": {
"builder": "@nrwl/storybook:storybook",
"builder": "@storybook/angular:start-storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "lib/core/.storybook"
}
"browserTarget": "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": {
"ci": {
@ -451,16 +457,19 @@
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"outputs": [
"{options.outputPath}"
],
"builder": "@storybook/angular:build-storybook",
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/core",
"config": {
"configFolder": "lib/core/.storybook"
}
"browserTarget": "core:build-storybook",
"configDir": "lib/core/.storybook",
"outputDir": "dist/storybook/core",
"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": {
"ci": {
@ -508,13 +517,19 @@
}
},
"storybook": {
"builder": "@nrwl/storybook:storybook",
"builder": "@storybook/angular:start-storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "lib/content-services/.storybook"
}
"browserTarget": "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": {
"ci": {
@ -523,16 +538,19 @@
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"outputs": [
"{options.outputPath}"
],
"builder": "@storybook/angular:build-storybook",
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/content-services",
"config": {
"configFolder": "lib/content-services/.storybook"
}
"browserTarget": "content-services:build-storybook",
"configDir": "lib/content-services/.storybook",
"outputDir": "dist/storybook/content-services",
"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": {
"ci": {
@ -619,13 +637,19 @@
}
},
"storybook": {
"builder": "@nrwl/storybook:storybook",
"builder": "@storybook/angular:start-storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "lib/process-services-cloud/.storybook"
}
"browserTarget": "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": {
"ci": {
@ -634,16 +658,19 @@
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"outputs": [
"{options.outputPath}"
],
"builder": "@storybook/angular:build-storybook",
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/process-services-cloud",
"config": {
"configFolder": "lib/process-services-cloud/.storybook"
}
"browserTarget": "process-services-cloud:build-storybook",
"configDir": "lib/process-services-cloud/.storybook",
"outputDir": "dist/storybook/process-services-cloud",
"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": {
"ci": {
@ -808,13 +835,19 @@
"projectType": "library",
"architect": {
"storybook": {
"builder": "@nrwl/storybook:storybook",
"builder": "@storybook/angular:start-storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "lib/stories/.storybook"
}
"browserTarget": "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": {
"ci": {
@ -823,16 +856,19 @@
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"outputs": [
"{options.outputPath}"
],
"builder": "@storybook/angular:build-storybook",
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/stories",
"config": {
"configFolder": "lib/stories/.storybook"
}
"browserTarget": "stories:build-storybook",
"configDir": "lib/stories/.storybook",
"outputDir": "dist/storybook/stories",
"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": {
"ci": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

View File

@ -7,8 +7,8 @@
* agreement is prohibited.
*/
import { PlaywrightTestConfig, ReporterDescription, WebServerConfig } from '@playwright/test';
import { dotenvConfig } from '@alfresco/adf-cli/tooling';
import { PlaywrightTestConfig, ReporterDescription } from '@playwright/test';
import { dotenvConfig } from '../lib/cli/tooling';
import { paths } from './utils/paths';
import { timeouts } from './utils/timeouts';
import path from 'path';
@ -28,8 +28,8 @@ export const getGlobalConfig = (): PlaywrightTestConfig => {
report = ['html', { outputFolder: path.resolve(`../${paths.report}`), open: 'on-failure' }];
}
const webServer: WebServerConfig = {
command: startCommand,
const webServer = {
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 won't check what application is currently running.
reuseExistingServer: true,
@ -53,7 +53,7 @@ export const getGlobalConfig = (): PlaywrightTestConfig => {
retries: env.CI ? 2 : 0,
/* 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: [['list'], report],

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

@ -4,5 +4,4 @@
sudo sysctl -w fs.inotify.max_user_watches=524288
# 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