Merge branch 'develop' of https://github.com/Alfresco/alfresco-ng2-components into ACA-4600-Added-Edit-profile-capabilities-for-user

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
This commit is contained in:
Shubham Bansal
2022-08-17 12:45:05 +00:00
22 changed files with 1653 additions and 2176 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:
@@ -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

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,5 +1,5 @@
<div [attr.data-automation-id]="'card-array-label-' + property.key" class="adf-property-label">{{ property.label | translate }}</div>
<div class="adf-property-value adf-card-view-array-item-container" (click)="clicked()">
<div class="adf-property-value adf-card-view-array-item-container">
<ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock">
<mat-chip-list *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container">
<ng-container *ngIf="displayCount() > 0; else withOutDisplayCount" >
@@ -46,6 +46,7 @@
<span class="adf-card-array-item-default" data-automation-id="card-arrayitem-default">{{ property?.default | translate }}</span>
</ng-template>
<button mat-icon-button *ngIf="showClickableIcon()"
(click)="clicked()"
class="adf-array-item-action"
[attr.aria-label]="'CORE.METADATA.ACTIONS.EDIT' | translate"
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"

View File

@@ -26,21 +26,11 @@
max-height: 300px;
overflow-y: auto;
}
.mat-chip {
cursor: pointer;
}
}
&-property-value {
.mat-chip-list {
width: 100%;
padding-top: 6px;
cursor: pointer;
}
.mat-chip {
cursor: pointer;
}
}
@@ -50,5 +40,9 @@
display: flex;
place-content: center space-between;
align-items: center;
.mat-chip:hover {
cursor: pointer;
}
}
}

View File

@@ -23,10 +23,13 @@ import { CardViewArrayItemComponent } from './card-view-arrayitem.component';
import { CardViewArrayItemModel, CardViewArrayItem } from '../../models/card-view-arrayitem.model';
import { By } from '@angular/platform-browser';
import { TranslateModule } from '@ngx-translate/core';
import { CardViewUpdateService } from 'core/public-api';
describe('CardViewArrayItemComponent', () => {
let component: CardViewArrayItemComponent;
let fixture: ComponentFixture<CardViewArrayItemComponent>;
let service: CardViewUpdateService;
let serviceSpy: jasmine.Spy;
const mockData = [
{ icon: 'person', value: 'Zlatan' },
@@ -55,10 +58,44 @@ describe('CardViewArrayItemComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(CardViewArrayItemComponent);
service = TestBed.inject(CardViewUpdateService);
component = fixture.componentInstance;
component.property = new CardViewArrayItemModel(mockDefaultProps);
});
describe('Click event', () => {
beforeEach(() => {
serviceSpy = spyOn(service, 'clicked');
component.property = new CardViewArrayItemModel({
...mockDefaultProps,
clickable: true
});
fixture.detectChanges();
});
it('should call service on chip click', () => {
const chip: HTMLElement = fixture.nativeElement.querySelector('[data-automation-id="card-arrayitem-chip-Zlatan"]');
chip.dispatchEvent(new Event('click'));
expect(serviceSpy).toHaveBeenCalled();
});
it('should call service on edit icon click', () => {
const editIcon: HTMLElement = fixture.nativeElement.querySelector('[data-automation-id="card-array-item-clickable-icon-array"]');
editIcon.dispatchEvent(new Event('click'));
expect(serviceSpy).toHaveBeenCalled();
});
it('should NOT call service on chip list container click', () => {
const chiplistContainer: HTMLElement = fixture.nativeElement.querySelector('[data-automation-id="card-arrayitem-chip-list-container"]');
chiplistContainer.dispatchEvent(new Event('click'));
expect(serviceSpy).not.toHaveBeenCalled();
});
});
describe('Rendering', () => {
it('should render the label', () => {
fixture.detectChanges();

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

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Upload protractor-smartrunner artifact related to this particular job to S3
./scripts/ci/utils/artifact-to-s3.sh -a "$SMART_RUNNER_DIRECTORY" -o "$S3_SMART_RUNNER_PATH/$TRAVIS_JOB_ID.tar.bz2"

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
# Download protractor-smartrunner artifact related to this particular job from S3, if exists
./scripts/ci/utils/artifact-from-s3.sh -a "$S3_SMART_RUNNER_PATH/$TRAVIS_JOB_ID.tar.bz2" -o "$SMART_RUNNER_DIRECTORY"
# TODO: This one needs to be cleaned up... Only fixing it like this, because for the current PR it is out of scope
# =======================================
rm -rf ./node_modules/@alfresco/adf-cli/ && \

View File

@@ -20,6 +20,9 @@ export HEAD_HASH="HEAD"
export HEAD_COMMIT_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}}
export COMMIT_MESSAGE=`git log --format=%B -n 1 $HEAD_COMMIT_HASH`
# Settings for S3 caching -------------------------------------------------------------
pip install --user awscli
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
echo "push"
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
show_help() {
echo "Usage: dbpci-artifact-from-s3 <options>"
echo ""
echo "-a or --artifact [mandatory]: path to the s3 artifact (tar.bz2) to download and extract"
echo "-o or --output [mandatory]: directory to extract the archive to"
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-a|--artifact) ARTIFACT=$2; shift 2;;
-o|--output) OUTPUT=$2; shift 2;;
-*) shift;;
esac
done
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ]
then
show_help;
exit 1
fi
echo -e "Download from S3 $ARTIFACT to $OUTPUT"
test ! -d $OUTPUT && mkdir -p $OUTPUT
IS_PRESENT="$(aws s3 ls $ARTIFACT | wc -l | tr -d ' ')"
if [ "${IS_PRESENT}" == "1" ]
then
echo "File ${ARTIFACT} is present. Copying"
aws s3 cp $ARTIFACT ./s3-artifact.tmp
tar -xf ./s3-artifact.tmp -C $OUTPUT
rm ./s3-artifact.tmp
else
echo "File ${ARTIFACT} not present"
exit 1;
fi

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
show_help() {
echo "Usage: dbpci-artifact-to-s3 <options>"
echo ""
echo "-a or --artifact [mandatory]: path to the artifact to archieve (tar.bz2) and upload (like ./dist)"
echo "-o or --output [mandatory]: the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2"
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-a|--artifact) ARTIFACT=$2; shift 2;;
-o|--output) OUTPUT=$2; shift 2;;
-*) shift;;
esac
done
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ]
then
show_help;
exit 1
fi
tar cfj ./s3-artifact.tmp -C $ARTIFACT `ls -A $ARTIFACT`
aws s3 cp ./s3-artifact.tmp $OUTPUT
rm ./s3-artifact.tmp

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