mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Rebased to the latest
This commit is contained in:
@@ -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;
|
||||
|
@@ -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: {
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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 }
|
||||
]
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user