Rebased to the latest

This commit is contained in:
Vito Albano 2024-02-19 15:53:44 +00:00
parent c7c0cb3b1a
commit a62c617cad
9 changed files with 31 additions and 36 deletions

View File

@ -122,6 +122,8 @@ describe('ContentNodeSelectorComponent', () => {
fixture.destroy(); fixture.destroy();
}); });
const getTabInfoButton = () => fixture.debugElement.query(By.css('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]'));
const enableLocalUpload = () => { const enableLocalUpload = () => {
component.data.showLocalUploadButton = true; component.data.showLocalUploadButton = true;
component.hasAllowableOperations = true; component.hasAllowableOperations = true;

View File

@ -21,11 +21,11 @@ import { of, Subject } from 'rxjs';
import { ContentTestingModule } from '../testing/content.testing.module'; import { ContentTestingModule } from '../testing/content.testing.module';
import { ContentTypeDialogComponent } from './content-type-dialog.component'; import { ContentTypeDialogComponent } from './content-type-dialog.component';
import { ContentTypeDialogComponentData } from './content-type-metadata.interface'; import { ContentTypeDialogComponentData } from './content-type-metadata.interface';
import { TypeEntry } from '@alfresco/js-api';
import { HarnessLoader } from '@angular/cdk/testing'; import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing'; import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
import { MatTableHarness } from '@angular/material/table/testing'; import { MatTableHarness } from '@angular/material/table/testing';
import { ContentTypeService } from './content-type.service';
const elementCustom: TypeEntry = { const elementCustom: TypeEntry = {
entry: { entry: {

View File

@ -24,7 +24,7 @@ import { SearchChipAutocompleteInputComponent } from './search-chip-autocomplete
import { DebugElement } from '@angular/core'; import { DebugElement } from '@angular/core';
import { HarnessLoader } from '@angular/cdk/testing'; import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatChipHarness, MatChipListHarness } from '@angular/material/chips/testing'; import { MatChipHarness, MatChipGridHarness } from '@angular/material/chips/testing';
import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing'; import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
import { MatOptionHarness } from '@angular/material/core/testing'; import { MatOptionHarness } from '@angular/material/core/testing';
@ -89,8 +89,8 @@ describe('SearchChipAutocompleteInputComponent', () => {
* @returns list of chips * @returns list of chips
*/ */
async function getChipList(): Promise<MatChipHarness[]> { async function getChipList(): Promise<MatChipHarness[]> {
const harness = await loader.getHarness(MatChipListHarness); const harness = await loader.getHarness(MatChipGridHarness);
return harness.getChips(); return harness.getRows();
} }
/** /**

View File

@ -17,7 +17,7 @@
import { TreeComponent } from './tree.component'; import { TreeComponent } from './tree.component';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AlfrescoApiService, AlfrescoApiServiceMock, ContextMenuDirective, ContextMenuModule, IconModule, TranslationMock, TranslationService, UserPreferencesService } from '@alfresco/adf-core'; import { ContextMenuDirective, CoreTestingModule, UserPreferencesService } from '@alfresco/adf-core';
import { MatTreeModule } from '@angular/material/tree'; import { MatTreeModule } from '@angular/material/tree';
import { TreeNode, TreeNodeType } from '../models/tree-node.interface'; import { TreeNode, TreeNodeType } from '../models/tree-node.interface';
import { import {
@ -67,24 +67,14 @@ describe('TreeComponent', () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
TranslateModule.forRoot(), CoreTestingModule,
HttpClientModule, MatTreeModule
NoopAnimationsModule,
MatTreeModule,
MatIconModule,
MatMenuModule,
MatProgressSpinnerModule,
MatCheckboxModule,
IconModule,
ContextMenuModule
], ],
declarations: [ declarations: [
TreeComponent TreeComponent
], ],
providers: [ providers: [
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: TreeService, useClass: TreeServiceMock }
{ provide: TreeService, useClass: TreeServiceMock },
{ provide: TranslationService, useClass: TranslationMock }
] ]
}); });

View File

@ -2,19 +2,19 @@
<div class="adf-property-value adf-card-view-array-item-container"> <div class="adf-property-value adf-card-view-array-item-container">
<ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock"> <ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock">
<mat-chip-listbox *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container"> <mat-chip-listbox *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container">
<ng-container *ngIf="displayCount() > 0; else withOutDisplayCount" > <ng-container *ngIf="displayCount > 0; else withOutDisplayCount" >
<mat-chip-option <mat-chip-option
*ngFor="let item of items.slice(0, displayCount())" *ngFor="let item of items.slice(0, displayCount)"
(click)="clicked()" (click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value"> [attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon> <mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
<span>{{item?.value}}</span> <span>{{item?.value}}</span>
</mat-chip-option> </mat-chip-option>
<mat-chip-option <mat-chip-option
*ngIf="items.length > displayCount()" *ngIf="items.length > displayCount"
data-automation-id="card-arrayitem-more-chip" data-automation-id="card-arrayitem-more-chip"
[matMenuTriggerFor]="menu"> [matMenuTriggerFor]="menu">
<span>{{items.length - displayCount()}} {{'CORE.CARDVIEW.MORE' | translate}}</span> <span>{{items.length - displayCount}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
</mat-chip-option> </mat-chip-option>
</ng-container> </ng-container>
<ng-template #withOutDisplayCount> <ng-template #withOutDisplayCount>
@ -32,7 +32,7 @@
<mat-card-content> <mat-card-content>
<mat-chip-listbox> <mat-chip-listbox>
<mat-chip-option (click)="clicked()" <mat-chip-option (click)="clicked()"
*ngFor="let item of items.slice(displayCount(), items.length)" *ngFor="let item of items.slice(displayCount, items.length)"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value"> [attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon> <mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
<span>{{item?.value}}</span> <span>{{item?.value}}</span>

View File

@ -4,7 +4,7 @@
[class.adf-dynamic-chip-list-button-in-next-line]="moveLoadMoreButtonToNextRow" [class.adf-dynamic-chip-list-button-in-next-line]="moveLoadMoreButtonToNextRow"
[class.adf-dynamic-chip-list-paginated]="paginationData" [class.adf-dynamic-chip-list-paginated]="paginationData"
#nodeListContainer> #nodeListContainer>
<mat-chip-list <mat-chip-listbox
[class.adf-dynamic-chip-list-full-width]="limitChipsDisplayed && !calculationsDone" [class.adf-dynamic-chip-list-full-width]="limitChipsDisplayed && !calculationsDone"
role="listbox" role="listbox"
[attr.aria-label]="'METADATA.BASIC.TAGS' | translate"> [attr.aria-label]="'METADATA.BASIC.TAGS' | translate">
@ -21,7 +21,7 @@
cancel cancel
</mat-icon> </mat-icon>
</mat-chip> </mat-chip>
</mat-chip-list> </mat-chip-listbox>
<button <button
data-automation-id="adf-dynamic-chip-list-view-more-button" data-automation-id="adf-dynamic-chip-list-view-more-button"
mat-button mat-button

View File

@ -269,7 +269,7 @@ describe('DynamicChipListComponent', () => {
}); });
tick(); tick();
fixture.detectChanges(); fixture.detectChanges();
element.style.maxWidth = '309px'; element.style.maxWidth = '100px';
resizeCallback([], null); resizeCallback([], null);
fixture.detectChanges(); fixture.detectChanges();

View File

@ -39,8 +39,8 @@
"@alfresco/adf-content-services": ">=6.8.0", "@alfresco/adf-content-services": ">=6.8.0",
"@apollo/client": "^3.7.2", "@apollo/client": "^3.7.2",
"@ngx-translate/core": ">=14.0.0", "@ngx-translate/core": ">=14.0.0",
"apollo-angular": ">=4.0.1", "apollo-angular": "^4.0.1",
"subscriptions-transport-ws": ">=0.11.0" "subscriptions-transport-ws": "^0.11.0"
}, },
"keywords": [ "keywords": [
"process-services-cloud", "process-services-cloud",

View File

@ -68,9 +68,6 @@
"@angular/router": "15.2.10", "@angular/router": "15.2.10",
"@apollo/client": "^3.8.4", "@apollo/client": "^3.8.4",
"@cspell/eslint-plugin": "^7.3.6", "@cspell/eslint-plugin": "^7.3.6",
"@editorjs/editorjs": "^2.26.5",
"@editorjs/header": "2.7.0",
"@editorjs/list": "1.8.0",
"@mat-datetimepicker/core": "11.0.3", "@mat-datetimepicker/core": "11.0.3",
"@ngx-translate/core": "^14.0.0", "@ngx-translate/core": "^14.0.0",
"@storybook/core-server": "^7.6.5", "@storybook/core-server": "^7.6.5",
@ -105,10 +102,17 @@
"@angular-eslint/template-parser": "16.2.0", "@angular-eslint/template-parser": "16.2.0",
"@angular/cli": "~15.2.0", "@angular/cli": "~15.2.0",
"@angular/compiler-cli": "15.2.10", "@angular/compiler-cli": "15.2.10",
"@editorjs/code": "2.8.0", "@editorjs/editorjs": "^2.29.0",
"@editorjs/inline-code": "1.4.0", "@editorjs/code": "2.9.0",
"@editorjs/marker": "1.2.2", "@editorjs/header": "2.8.1",
"@editorjs/underline": "^1.1.0", "@editorjs/inline-code": "1.5.0",
"@editorjs/list": "1.9.0",
"@editorjs/marker": "1.4.0",
"@editorjs/underline": "1.1.0",
"editorjs-text-color-plugin": "2.0.4",
"editorjs-html": "3.4.3",
"editorjs-paragraph-with-alignment": "3.0.0",
"@quanzo/change-font-size": "1.0.0",
"@nrwl/angular": "15.9.3", "@nrwl/angular": "15.9.3",
"@nrwl/cli": "15.9.3", "@nrwl/cli": "15.9.3",
"@nrwl/eslint-plugin-nx": "15.9.3", "@nrwl/eslint-plugin-nx": "15.9.3",
@ -117,7 +121,6 @@
"@nrwl/workspace": "15.9.3", "@nrwl/workspace": "15.9.3",
"@paperist/types-remark": "0.1.3", "@paperist/types-remark": "0.1.3",
"@playwright/test": "^1.35.1", "@playwright/test": "^1.35.1",
"@quanzo/change-font-size": "1.0.0",
"@schematics/angular": "15.2.10", "@schematics/angular": "15.2.10",
"@storybook/addon-essentials": "6.5.16", "@storybook/addon-essentials": "6.5.16",
"@storybook/angular": "6.5.16", "@storybook/angular": "6.5.16",