diff --git a/.storybook/alfrescoTheme.js b/.storybook/alfrescoTheme.js index 3ae4aea6ac..687313c954 100644 --- a/.storybook/alfrescoTheme.js +++ b/.storybook/alfrescoTheme.js @@ -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, }); diff --git a/.storybook/main.js b/.storybook/main.js index e8a63cf3b3..51d3372dc5 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -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' } }; diff --git a/.travis.yml b/.travis.yml index bdef25463c..4e8a31587b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -197,6 +197,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -217,6 +218,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -237,6 +239,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -257,6 +260,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -277,6 +281,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -297,6 +302,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -317,6 +323,7 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -338,6 +345,7 @@ jobs: - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -359,6 +367,7 @@ jobs: - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -380,6 +389,7 @@ jobs: - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -401,6 +411,7 @@ jobs: - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -434,6 +445,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -456,6 +468,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -478,6 +491,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -500,6 +514,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache @@ -522,6 +537,7 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh + after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: name: e2e_cache diff --git a/angular.json b/angular.json index a7c5611e56..8cb53fd8a4 100644 --- a/angular.json +++ b/angular.json @@ -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": { diff --git a/demo-shell/src/assets/storybook-logo.png b/demo-shell/src/assets/storybook-logo.png deleted file mode 100644 index 45f4c6eb14..0000000000 Binary files a/demo-shell/src/assets/storybook-logo.png and /dev/null differ diff --git a/e2e-playwright/playwright.config.ts b/e2e-playwright/playwright.config.ts index 4a85b61a79..bf230183e7 100644 --- a/e2e-playwright/playwright.config.ts +++ b/e2e-playwright/playwright.config.ts @@ -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], diff --git a/e2e-playwright/utils/timeouts.ts b/e2e-playwright/utils/timeouts.ts index f06bfd7651..d5d822993f 100644 --- a/e2e-playwright/utils/timeouts.ts +++ b/e2e-playwright/utils/timeouts.ts @@ -12,6 +12,6 @@ export const timeouts = { medium: 5000, large: 10000, globalTest: 30 * 1000, - webServer: 120 * 1000, + webServer: 240 * 1000, globalSpec: 60 * 10 * 1000 }; diff --git a/lib/content-services/.storybook/main.js b/lib/content-services/.storybook/main.js index 0ba498c521..04ee5c38d2 100644 --- a/lib/content-services/.storybook/main.js +++ b/lib/content-services/.storybook/main.js @@ -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 ] }; diff --git a/lib/core/.storybook/main.js b/lib/core/.storybook/main.js index 15262367e2..1f97f44fc7 100644 --- a/lib/core/.storybook/main.js +++ b/lib/core/.storybook/main.js @@ -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 ] }; diff --git a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.html b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.html index 257a562e49..39b2eb0376 100644 --- a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.html +++ b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.html @@ -1,5 +1,5 @@
{{ property.label | translate }}
-
+
@@ -46,6 +46,7 @@ {{ property?.default | translate }}