mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix production builds (#6075)
* run builds scripts sequentially * temporary enable prod builds * use ng instead of nx for adf-core * increase mem * downgrage the ts target * downgrade main tsconfig * update config * downgrade scss-bundle * raise mem only for prod builds * restore dev build * update angular cdk * try restore build target * upgrade unit tests after angular upgrade * fix tests after angular upgrade * remove old e2e
This commit is contained in:
@@ -53,9 +53,7 @@ jobs:
|
||||
- stage: Lint & Build Dist & Release
|
||||
name: Build
|
||||
script:
|
||||
- ./scripts/travis/build/build.sh
|
||||
- ./scripts/lint.sh
|
||||
- ./scripts/travis/release/release-npm.sh
|
||||
- ./scripts/travis/build/build.sh && ./scripts/lint.sh && ./scripts/travis/release/release-npm.sh
|
||||
after_success:
|
||||
- ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/demo-shell -o "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2"
|
||||
- ./scripts/ci/utils/artifact-to-s3.sh -a ./lib/dist -o "$S3_DBP_FOLDER/alfresco-libs.tar.bz2"
|
||||
|
@@ -74,14 +74,6 @@ describe('Search component - Text widget', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C289329] Placeholder should be displayed in the widget when the input string is empty', async () => {
|
||||
await BrowserActions.getUrl(browser.baseUrl + '/search;q=*');
|
||||
await searchResultPage.tableIsLoaded();
|
||||
|
||||
await searchFiltersPage.checkNameFilterIsDisplayed();
|
||||
await expect(await searchFiltersPage.textFiltersPage().getNamePlaceholder()).toEqual('Enter the name');
|
||||
});
|
||||
|
||||
describe('configuration change', () => {
|
||||
let jsonFile;
|
||||
|
||||
|
@@ -120,7 +120,7 @@ describe('TextWidgetComponent', () => {
|
||||
expect(widget.field.isValid).toBe(false);
|
||||
});
|
||||
|
||||
it('should be able to set a placeholder for Text widget', () => {
|
||||
it('should be able to set a placeholder for Text widget', async () => {
|
||||
widget.field = new FormFieldModel(new FormModel({ taskId: 'fake-task-id' }), {
|
||||
id: 'text-id',
|
||||
name: 'text-name',
|
||||
@@ -130,8 +130,10 @@ describe('TextWidgetComponent', () => {
|
||||
placeholder: 'Your name here'
|
||||
});
|
||||
fixture.detectChanges();
|
||||
const textWidgetLabel = element.querySelector('input');
|
||||
expect(textWidgetLabel.getAttribute('placeholder')).toBe('Your name here');
|
||||
await fixture.whenStable();
|
||||
|
||||
const label = element.querySelector<HTMLElement>('label.mat-form-field-label[for="text-id"]');
|
||||
expect(label.innerText).toBe('Your name here');
|
||||
});
|
||||
|
||||
it('should be able to set min/max length properties for Text widget', async () => {
|
||||
@@ -217,7 +219,7 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
});
|
||||
|
||||
it('should be disabled on readonly forms', async(() => {
|
||||
@@ -247,7 +249,7 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
});
|
||||
|
||||
it('should show text widget', () => {
|
||||
@@ -256,21 +258,18 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
|
||||
it('should show the field placeholder', () => {
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('simple placeholder');
|
||||
const label = element.querySelector<HTMLElement>('label.mat-form-field-label[for="text-id"]');
|
||||
expect(label.innerText).toBe('simple placeholder');
|
||||
});
|
||||
|
||||
it('should show the field placeholder when clicked', async(() => {
|
||||
it('should show the field placeholder when clicked', async () => {
|
||||
inputElement.click();
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('simple placeholder');
|
||||
await fixture.whenStable();
|
||||
|
||||
const label = element.querySelector<HTMLElement>('label.mat-form-field-label[for="text-id"]');
|
||||
expect(label.innerText).toBe('simple placeholder');
|
||||
});
|
||||
}));
|
||||
|
||||
it('should prevent text to be written if is not allowed by the mask on keyUp event', async(() => {
|
||||
expect(element.querySelector('#text-id')).not.toBeNull();
|
||||
@@ -284,7 +283,7 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
expect(inputElement.value).toBe('');
|
||||
});
|
||||
}));
|
||||
@@ -299,7 +298,7 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
expect(inputElement.value).toBe('');
|
||||
});
|
||||
}));
|
||||
@@ -315,7 +314,7 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
const textEle: HTMLInputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
const textEle = element.querySelector<HTMLInputElement>('#text-id');
|
||||
expect(textEle.value).toBe('1');
|
||||
});
|
||||
}));
|
||||
@@ -331,7 +330,7 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
const textEle: HTMLInputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
const textEle = element.querySelector<HTMLInputElement>('#text-id');
|
||||
expect(textEle.value).toBe('12-345,67%');
|
||||
});
|
||||
}));
|
||||
@@ -352,7 +351,7 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -371,7 +370,7 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
const textEle: HTMLInputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
const textEle = element.querySelector<HTMLInputElement>('#text-id');
|
||||
expect(textEle.value).toBe('12,34%');
|
||||
});
|
||||
}));
|
||||
@@ -393,25 +392,22 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
inputElement = <HTMLInputElement> element.querySelector('#text-id');
|
||||
inputElement = element.querySelector<HTMLInputElement>('#text-id');
|
||||
});
|
||||
|
||||
it('should show the input mask placeholder', () => {
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('Phone : (__) ___-___');
|
||||
const label = element.querySelector<HTMLElement>('label.mat-form-field-label[for="text-id"]');
|
||||
expect(label.innerText).toBe('Phone : (__) ___-___');
|
||||
});
|
||||
|
||||
it('should show the input mask placeholder when clicked', async(() => {
|
||||
it('should show the input mask placeholder when clicked', async () => {
|
||||
inputElement.click();
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(inputElement).toBeDefined();
|
||||
expect(inputElement).not.toBeNull();
|
||||
expect(inputElement.placeholder).toBe('Phone : (__) ___-___');
|
||||
await fixture.whenStable();
|
||||
|
||||
const label = element.querySelector<HTMLElement>('label.mat-form-field-label[for="text-id"]');
|
||||
expect(label.innerText).toBe('Phone : (__) ___-___');
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,6 +28,7 @@ describe('PeopleSearchFieldComponent', () => {
|
||||
let component: PeopleSearchFieldComponent;
|
||||
let fixture: ComponentFixture<PeopleSearchFieldComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
@@ -40,21 +41,23 @@ describe('PeopleSearchFieldComponent', () => {
|
||||
fixture = TestBed.createComponent(PeopleSearchFieldComponent);
|
||||
component = fixture.componentInstance;
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement as HTMLElement;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should have the proper placeholder by default', () => {
|
||||
const searchField = debug.query(By.css('[data-automation-id="adf-people-search-input"]')).nativeElement;
|
||||
expect(searchField.placeholder).toBe('ADF_TASK_LIST.PEOPLE.SEARCH_USER');
|
||||
const label = element.querySelector<HTMLElement>('label[for="userSearchText"]');
|
||||
expect(label.innerText).toBe('ADF_TASK_LIST.PEOPLE.SEARCH_USER');
|
||||
});
|
||||
|
||||
it('should have the overridden placeholder if set as input parameter', () => {
|
||||
it('should have the overridden placeholder if set as input parameter', async () => {
|
||||
component.placeholder = 'Arcadia Bay';
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const searchField = debug.query(By.css('[data-automation-id="adf-people-search-input"]')).nativeElement;
|
||||
expect(searchField.placeholder).toBe('Arcadia Bay');
|
||||
const label = element.querySelector<HTMLElement>('label[for="userSearchText"]');
|
||||
expect(label.innerText).toBe('Arcadia Bay');
|
||||
});
|
||||
|
||||
it('should reset the user on reset method invocation', () => {
|
||||
|
@@ -28,11 +28,6 @@ export class SearchTextPage {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
async getNamePlaceholder(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
return this.filter.element(this.inputBy).getAttribute('placeholder');
|
||||
}
|
||||
|
||||
async searchByName(name: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
await BrowserActions.clearSendKeys(this.filter.element(this.inputBy), name);
|
||||
|
4381
package-lock.json
generated
4381
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -73,7 +73,7 @@
|
||||
"dependencies": {
|
||||
"@alfresco/js-api": "4.0.0",
|
||||
"@angular/animations": "^10.0.4",
|
||||
"@angular/cdk": "10.0.2",
|
||||
"@angular/cdk": "10.1.3",
|
||||
"@angular/common": "^10.0.4",
|
||||
"@angular/compiler": "^10.0.4",
|
||||
"@angular/core": "^10.0.4",
|
||||
@@ -166,7 +166,7 @@
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs-tslint-rules": "^4.10.0",
|
||||
"sass-loader": "10.0.0",
|
||||
"scss-bundle": "3.1.2",
|
||||
"scss-bundle": "2.3.2",
|
||||
"selenium-webdriver": "4.0.0-alpha.5",
|
||||
"stylelint": "^13.6.1",
|
||||
"ts-node": "^8.10.2",
|
||||
|
@@ -7,11 +7,9 @@ cd $DIR/../..
|
||||
echo "====== Content Services ======"
|
||||
echo "====== Build ======"
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building content-services for production"
|
||||
nx build content-services --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build content-services --prod || exit 1
|
||||
else
|
||||
echo "Building content-services for development"
|
||||
nx build content-services || exit 1
|
||||
|
@@ -9,7 +9,7 @@ echo "====== Build ======"
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building core for production"
|
||||
node --max_old_space_size=8192 ./node_modules/@nrwl/cli/bin/nx build core --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build core --prod || exit 1
|
||||
else
|
||||
echo "Building core for development"
|
||||
nx build core || exit 1
|
||||
|
@@ -4,11 +4,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../..
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building extensions for production"
|
||||
nx build extensions --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build extensions --prod || exit 1
|
||||
else
|
||||
echo "Building extensions for development"
|
||||
nx build extensions || exit 1
|
||||
|
@@ -7,11 +7,9 @@ cd $DIR/../..
|
||||
echo "====== Insights ======"
|
||||
echo "====== Build ======"
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building insights for production"
|
||||
nx build insights --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build insights --prod || exit 1
|
||||
else
|
||||
echo "Building insights for development"
|
||||
nx build insights || exit 1
|
||||
|
@@ -7,11 +7,9 @@ cd $DIR/../..
|
||||
echo "====== Process Services Cloud ======"
|
||||
echo "====== Build ======"
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building process-services-cloud for production"
|
||||
nx build process-services-cloud --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services-cloud --prod || exit 1
|
||||
else
|
||||
echo "Building process-services-cloud for development"
|
||||
nx build process-services-cloud || exit 1
|
||||
|
@@ -7,11 +7,9 @@ cd $DIR/../..
|
||||
echo "====== Process Services ======"
|
||||
echo "====== Build ======"
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building process-services for production"
|
||||
nx build process-services --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services --prod || exit 1
|
||||
else
|
||||
echo "Building process-services for development"
|
||||
nx build process-services || exit 1
|
||||
|
@@ -7,11 +7,10 @@ cd $DIR/../..
|
||||
echo "====== Testing ======"
|
||||
echo "====== Build ======"
|
||||
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "Building testing for production"
|
||||
nx build testing --prod || exit 1
|
||||
NODE_OPTIONS="--max-old-space-size=8192" nx build testing --prod || exit 1
|
||||
else
|
||||
echo "Building testing for development"
|
||||
nx build testing || exit 1
|
||||
|
Reference in New Issue
Block a user