Rebased to the latest

This commit is contained in:
Vito Albano
2024-02-19 15:53:44 +00:00
committed by VitoAlbano
parent 059078324a
commit e5fdefb0cf
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

@@ -275,7 +275,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",