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();
});
const getTabInfoButton = () => fixture.debugElement.query(By.css('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]'));
const enableLocalUpload = () => {
component.data.showLocalUploadButton = true;
component.hasAllowableOperations = true;

View File

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

View File

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

View File

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

View File

@ -2,19 +2,19 @@
<div class="adf-property-value adf-card-view-array-item-container">
<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">
<ng-container *ngIf="displayCount() > 0; else withOutDisplayCount" >
<ng-container *ngIf="displayCount > 0; else withOutDisplayCount" >
<mat-chip-option
*ngFor="let item of items.slice(0, displayCount())"
*ngFor="let item of items.slice(0, displayCount)"
(click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
<span>{{item?.value}}</span>
</mat-chip-option>
<mat-chip-option
*ngIf="items.length > displayCount()"
*ngIf="items.length > displayCount"
data-automation-id="card-arrayitem-more-chip"
[matMenuTriggerFor]="menu">
<span>{{items.length - displayCount()}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
<span>{{items.length - displayCount}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
</mat-chip-option>
</ng-container>
<ng-template #withOutDisplayCount>
@ -32,7 +32,7 @@
<mat-card-content>
<mat-chip-listbox>
<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">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
<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-paginated]="paginationData"
#nodeListContainer>
<mat-chip-list
<mat-chip-listbox
[class.adf-dynamic-chip-list-full-width]="limitChipsDisplayed && !calculationsDone"
role="listbox"
[attr.aria-label]="'METADATA.BASIC.TAGS' | translate">
@ -21,7 +21,7 @@
cancel
</mat-icon>
</mat-chip>
</mat-chip-list>
</mat-chip-listbox>
<button
data-automation-id="adf-dynamic-chip-list-view-more-button"
mat-button

View File

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

View File

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

View File

@ -68,9 +68,6 @@
"@angular/router": "15.2.10",
"@apollo/client": "^3.8.4",
"@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",
"@ngx-translate/core": "^14.0.0",
"@storybook/core-server": "^7.6.5",
@ -105,10 +102,17 @@
"@angular-eslint/template-parser": "16.2.0",
"@angular/cli": "~15.2.0",
"@angular/compiler-cli": "15.2.10",
"@editorjs/code": "2.8.0",
"@editorjs/inline-code": "1.4.0",
"@editorjs/marker": "1.2.2",
"@editorjs/underline": "^1.1.0",
"@editorjs/editorjs": "^2.29.0",
"@editorjs/code": "2.9.0",
"@editorjs/header": "2.8.1",
"@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/cli": "15.9.3",
"@nrwl/eslint-plugin-nx": "15.9.3",
@ -117,7 +121,6 @@
"@nrwl/workspace": "15.9.3",
"@paperist/types-remark": "0.1.3",
"@playwright/test": "^1.35.1",
"@quanzo/change-font-size": "1.0.0",
"@schematics/angular": "15.2.10",
"@storybook/addon-essentials": "6.5.16",
"@storybook/angular": "6.5.16",