mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Fixing unit test after last rebase + lint
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
<mat-form-field [floatLabel]="'auto'" [attr.data-automation-id]="processFilterProperty.key">
|
||||
<mat-form-field floatLabel="auto" [attr.data-automation-id]="processFilterProperty.key">
|
||||
<mat-label>{{ processFilterProperty.label | translate }}</mat-label>
|
||||
<mat-select
|
||||
placeholder="{{ processFilterProperty.label | translate }}"
|
||||
[value]="type"
|
||||
@@ -12,7 +13,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="isDateRangeType()">
|
||||
<mat-form-field [floatLabel]="'auto'" class="adf-cloud-date-range-picker">
|
||||
<mat-form-field floatLabel="auto" class="adf-cloud-date-range-picker">
|
||||
<mat-label>{{ 'ADF_CLOUD_EDIT_PROCESS_FILTER.LABEL.DATE_RANGE_TITLE' | translate }}</mat-label>
|
||||
<mat-date-range-input [formGroup]="dateRangeForm" [rangePicker]="picker">
|
||||
<input matStartDate formControlName="from" placeholder="{{ 'ADF_CLOUD_EDIT_PROCESS_FILTER.LABEL.START_DATE' | translate }}">
|
||||
|
@@ -27,9 +27,14 @@ import { ProcessContentService } from '../form/services/process-content.service'
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatMenuItemHarness } from '@angular/material/menu/testing';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||
|
||||
describe('TaskAttachmentList', () => {
|
||||
|
||||
let component: TaskAttachmentListComponent;
|
||||
let fixture: ComponentFixture<TaskAttachmentListComponent>;
|
||||
let service: ProcessContentService;
|
||||
@@ -44,15 +49,13 @@ describe('TaskAttachmentList', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
HttpClientModule,
|
||||
HttpClientTestingModule,
|
||||
MatMenuModule,
|
||||
NoopAnimationsModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatTooltipModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }
|
||||
]
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskAttachmentListComponent);
|
||||
component = fixture.componentInstance;
|
||||
@@ -129,12 +132,14 @@ describe('TaskAttachmentList', () => {
|
||||
});
|
||||
|
||||
it('should show the empty default message when has no custom template', async () => {
|
||||
getTaskRelatedContentSpy.and.returnValue(of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
}));
|
||||
getTaskRelatedContentSpy.and.returnValue(
|
||||
of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
})
|
||||
);
|
||||
const change = new SimpleChange(null, '123', true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
component.hasCustomTemplate = false;
|
||||
@@ -186,12 +191,14 @@ describe('TaskAttachmentList', () => {
|
||||
});
|
||||
|
||||
it('should show the empty list component when the attachments list is empty', async () => {
|
||||
getTaskRelatedContentSpy.and.returnValue(of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
}));
|
||||
getTaskRelatedContentSpy.and.returnValue(
|
||||
of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
})
|
||||
);
|
||||
const change = new SimpleChange(null, '123', true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
|
||||
@@ -202,19 +209,23 @@ describe('TaskAttachmentList', () => {
|
||||
});
|
||||
|
||||
it('should show the empty list component when the attachments list is empty for completed task', async () => {
|
||||
getTaskRelatedContentSpy.and.returnValue(of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
}));
|
||||
getTaskRelatedContentSpy.and.returnValue(
|
||||
of({
|
||||
size: 0,
|
||||
total: 0,
|
||||
start: 0,
|
||||
data: []
|
||||
})
|
||||
);
|
||||
const change = new SimpleChange(null, '123', true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
component.disabled = true;
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual('ADF_TASK_LIST.ATTACHMENT.EMPTY.HEADER');
|
||||
expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').innerText.trim()).toEqual(
|
||||
'ADF_TASK_LIST.ATTACHMENT.EMPTY.HEADER'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -235,7 +246,6 @@ describe('TaskAttachmentList', () => {
|
||||
});
|
||||
|
||||
describe('change detection', () => {
|
||||
|
||||
let change: SimpleChange;
|
||||
let nullChange: SimpleChange;
|
||||
|
||||
@@ -269,7 +279,6 @@ describe('TaskAttachmentList', () => {
|
||||
});
|
||||
|
||||
describe('Delete attachments', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
component.taskId = '123';
|
||||
fixture.whenStable();
|
||||
@@ -295,18 +304,14 @@ describe('TaskAttachmentList', () => {
|
||||
</adf-task-attachment-list>
|
||||
`
|
||||
})
|
||||
class CustomEmptyTemplateComponent {
|
||||
}
|
||||
class CustomEmptyTemplateComponent {}
|
||||
|
||||
describe('Custom CustomEmptyTemplateComponent', () => {
|
||||
let fixture: ComponentFixture<CustomEmptyTemplateComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessTestingModule
|
||||
],
|
||||
imports: [TranslateModule.forRoot(), ProcessTestingModule],
|
||||
declarations: [CustomEmptyTemplateComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@@ -17,7 +17,21 @@
|
||||
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { FormService, ContainerModel, FormFieldTypes, FormFieldOption, FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import {
|
||||
FormService,
|
||||
ContainerModel,
|
||||
FormFieldTypes,
|
||||
FormFieldOption,
|
||||
FormFieldModel,
|
||||
FormModel,
|
||||
ErrorWidgetComponent,
|
||||
TranslationMock,
|
||||
AlfrescoApiServiceMock,
|
||||
AppConfigServiceMock,
|
||||
AppConfigService,
|
||||
AlfrescoApiService,
|
||||
TranslationService
|
||||
} from '@alfresco/adf-core';
|
||||
import { RadioButtonsWidgetComponent } from './radio-buttons.widget';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
@@ -29,6 +43,9 @@ import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatRadioButtonHarness, MatRadioGroupHarness } from '@angular/material/radio/testing';
|
||||
import { MatTooltipHarness } from '@angular/material/tooltip/testing';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
|
||||
describe('RadioButtonsWidgetComponent', () => {
|
||||
let formService: FormService;
|
||||
@@ -47,8 +64,8 @@ describe('RadioButtonsWidgetComponent', () => {
|
||||
HttpClientTestingModule,
|
||||
MatIconModule
|
||||
],
|
||||
declarations:[RadioButtonsWidgetComponent, ErrorWidgetComponent],
|
||||
providers:[
|
||||
declarations: [RadioButtonsWidgetComponent, ErrorWidgetComponent],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock }
|
||||
|
@@ -10,6 +10,7 @@
|
||||
<div class="content">
|
||||
<div class="adf-start-process-definition-container">
|
||||
<mat-form-field *ngIf="showSelectApplicationDropdown" [floatLabel]="'always'" class="adf-start-process-app-list">
|
||||
<mat-label>{{ 'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.SELECT_APPLICATION' | translate }}</mat-label>
|
||||
<mat-select
|
||||
placeholder="{{ 'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.SELECT_APPLICATION' | translate }}"
|
||||
(selectionChange)="onAppSelectionChange($event)"
|
||||
|
@@ -34,6 +34,13 @@ import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
|
||||
import { FormModule } from '../../form';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
|
||||
describe('StartProcessComponent', () => {
|
||||
let appConfig: AppConfigService;
|
||||
@@ -62,15 +69,18 @@ describe('StartProcessComponent', () => {
|
||||
MatInputModule,
|
||||
MatIconModule,
|
||||
MatSelectModule,
|
||||
MatAutocompleteModule],
|
||||
MatAutocompleteModule
|
||||
],
|
||||
declarations: [StartProcessInstanceComponent],
|
||||
providers:[ ProcessNamePipe,
|
||||
LocalizedDatePipe,
|
||||
ActivitiContentService,
|
||||
ProcessService,
|
||||
AppsProcessService,
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock } ]
|
||||
providers: [
|
||||
ProcessNamePipe,
|
||||
LocalizedDatePipe,
|
||||
ActivitiContentService,
|
||||
ProcessService,
|
||||
AppsProcessService,
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
@@ -194,7 +204,9 @@ describe('StartProcessComponent', () => {
|
||||
component.processDefinitionInput.setValue('My Default Name');
|
||||
component.processNameInput.setValue('claim');
|
||||
|
||||
const inputLabels = await loader.getAllHarnesses(MatFormFieldHarness.with({ ancestor: '.adf-start-process', selector: '.adf-process-input-container' }));
|
||||
const inputLabels = await loader.getAllHarnesses(
|
||||
MatFormFieldHarness.with({ ancestor: '.adf-start-process', selector: '.adf-process-input-container' })
|
||||
);
|
||||
expect(inputLabels.length).toBe(2);
|
||||
});
|
||||
|
||||
|
@@ -18,22 +18,30 @@
|
||||
import { Component, SimpleChange, ViewChild, OnInit, Output, EventEmitter, SimpleChanges } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AppConfigService, DataRowEvent, ObjectDataRow, DataCellEvent, ObjectDataColumn, DataTableModule, AppConfigServiceMock, AlfrescoApiServiceMock, AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import {
|
||||
AppConfigService,
|
||||
DataRowEvent,
|
||||
ObjectDataRow,
|
||||
DataCellEvent,
|
||||
ObjectDataColumn,
|
||||
DataTableModule,
|
||||
AppConfigServiceMock,
|
||||
AlfrescoApiServiceMock,
|
||||
AlfrescoApiService
|
||||
} from '@alfresco/adf-core';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { TaskListComponent } from './task-list.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import {
|
||||
fakeGlobalTask,
|
||||
fakeEmptyTask,
|
||||
paginatedTask,
|
||||
fakeColumnSchema, fakeCustomSchema
|
||||
} from '../../mock';
|
||||
import { fakeGlobalTask, fakeEmptyTask, paginatedTask, fakeColumnSchema, fakeCustomSchema } from '../../mock';
|
||||
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
|
||||
import { MatMenuItemHarness } from '@angular/material/menu/testing';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -99,15 +107,9 @@ describe('TaskListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
DataTableModule,
|
||||
NoopAnimationsModule,
|
||||
MatProgressSpinnerModule,
|
||||
HttpClientTestingModule
|
||||
],
|
||||
imports: [TranslateModule.forRoot(), DataTableModule, NoopAnimationsModule, MatProgressSpinnerModule, HttpClientTestingModule],
|
||||
declarations: [TaskListComponent],
|
||||
providers:[
|
||||
providers: [
|
||||
TaskListService,
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock }
|
||||
@@ -198,7 +200,7 @@ describe('TaskListComponent', () => {
|
||||
expect(component.rows[0]['assignee'].id).toEqual(2);
|
||||
expect(component.rows[0]['assignee'].firstName).toEqual('firstNameFake1');
|
||||
expect(component.rows[0]['assignee'].lastName).toEqual('lastNameFake1');
|
||||
expect(component.rows[0][('assignee')].email).toEqual('emailFake1');
|
||||
expect(component.rows[0]['assignee'].email).toEqual('emailFake1');
|
||||
expect(component.rows[0]['created'].toISOString()).toEqual('2017-03-01T12:25:17.189Z');
|
||||
expect(component.rows[0]['dueDate'].toISOString()).toEqual('2017-04-02T12:25:17.189Z');
|
||||
expect(component.rows[0]['endDate'].toISOString()).toEqual('2017-05-03T12:25:31.129Z');
|
||||
@@ -341,7 +343,6 @@ describe('TaskListComponent', () => {
|
||||
});
|
||||
|
||||
describe('component changes', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
component.rows = fakeGlobalTask.data;
|
||||
fixture.detectChanges();
|
||||
@@ -647,22 +648,19 @@ describe('TaskListComponent', () => {
|
||||
});
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-tasklist #taskList>
|
||||
template: ` <adf-tasklist #taskList>
|
||||
<data-columns>
|
||||
<data-column key="name" title="ADF_TASK_LIST.PROPERTIES.NAME" class="full-width name-column" [order]="3"></data-column>
|
||||
<data-column key="created" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="hidden"></data-column>
|
||||
<data-column key="startedBy" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="desktop-only dw-dt-col-3 ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div>{{entry.row?.obj?.startedBy | fullName}}</div>
|
||||
<div>{{ entry.row?.obj?.startedBy | fullName }}</div>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-tasklist>`
|
||||
})
|
||||
|
||||
class CustomTaskListComponent {
|
||||
|
||||
@ViewChild(TaskListComponent)
|
||||
taskList: TaskListComponent;
|
||||
}
|
||||
@@ -673,10 +671,7 @@ describe('CustomTaskListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessTestingModule
|
||||
],
|
||||
imports: [TranslateModule.forRoot(), ProcessTestingModule],
|
||||
declarations: [CustomTaskListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(CustomTaskListComponent);
|
||||
@@ -700,15 +695,14 @@ describe('CustomTaskListComponent', () => {
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-tasklist [appId]="1">
|
||||
<adf-custom-empty-content-template>
|
||||
<p id="custom-id">CUSTOM EMPTY</p>
|
||||
</adf-custom-empty-content-template>
|
||||
</adf-tasklist>
|
||||
`
|
||||
<adf-tasklist [appId]="1">
|
||||
<adf-custom-empty-content-template>
|
||||
<p id="custom-id">CUSTOM EMPTY</p>
|
||||
</adf-custom-empty-content-template>
|
||||
</adf-tasklist>
|
||||
`
|
||||
})
|
||||
class EmptyTemplateComponent {
|
||||
}
|
||||
class EmptyTemplateComponent {}
|
||||
|
||||
describe('Task List: Custom EmptyTemplateComponent', () => {
|
||||
let fixture: ComponentFixture<EmptyTemplateComponent>;
|
||||
@@ -717,10 +711,7 @@ describe('Task List: Custom EmptyTemplateComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessTestingModule
|
||||
],
|
||||
imports: [TranslateModule.forRoot(), ProcessTestingModule],
|
||||
declarations: [EmptyTemplateComponent]
|
||||
});
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
@@ -746,25 +737,19 @@ describe('Task List: Custom EmptyTemplateComponent', () => {
|
||||
});
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-tasklist
|
||||
[showContextMenu]="true"
|
||||
(showRowContextMenu)="onShowRowContextMenu($event)"
|
||||
#taskList>
|
||||
template: ` <adf-tasklist [showContextMenu]="true" (showRowContextMenu)="onShowRowContextMenu($event)" #taskList>
|
||||
<data-columns>
|
||||
<data-column key="name" title="ADF_TASK_LIST.PROPERTIES.NAME" class="full-width name-column"></data-column>
|
||||
<data-column key="created" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="hidden"></data-column>
|
||||
<data-column key="startedBy" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="desktop-only dw-dt-col-3 ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div>{{entry.row?.obj?.startedBy | fullName}}</div>
|
||||
<div>{{ entry.row?.obj?.startedBy | fullName }}</div>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-tasklist>`
|
||||
})
|
||||
|
||||
class TaskListContextMenuComponent implements OnInit {
|
||||
|
||||
@Output()
|
||||
contextAction = new EventEmitter<any>();
|
||||
private performAction$ = new Subject<any>();
|
||||
@@ -777,8 +762,7 @@ class TaskListContextMenuComponent implements OnInit {
|
||||
event.value.actions = [
|
||||
{
|
||||
data: event.value.row['obj'],
|
||||
model:
|
||||
{
|
||||
model: {
|
||||
key: 'taskDetails',
|
||||
icon: 'open',
|
||||
title: 'View Task Details',
|
||||
@@ -788,8 +772,7 @@ class TaskListContextMenuComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
data: event.value.row['obj'],
|
||||
model:
|
||||
{
|
||||
model: {
|
||||
key: 'cancel',
|
||||
icon: 'open',
|
||||
title: 'Cancel Process',
|
||||
@@ -801,10 +784,9 @@ class TaskListContextMenuComponent implements OnInit {
|
||||
}
|
||||
|
||||
performContextActions() {
|
||||
this.performAction$
|
||||
.subscribe((action: any) => {
|
||||
this.performAction$.subscribe((action: any) => {
|
||||
this.contextAction.emit(action.data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -817,14 +799,8 @@ describe('TaskListContextMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
MatProgressSpinnerModule,
|
||||
ProcessTestingModule
|
||||
],
|
||||
declarations: [
|
||||
TaskListContextMenuComponent
|
||||
]
|
||||
imports: [TranslateModule.forRoot(), MatProgressSpinnerModule, ProcessTestingModule],
|
||||
declarations: [TaskListContextMenuComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskListContextMenuComponent);
|
||||
customComponent = fixture.componentInstance;
|
||||
@@ -840,7 +816,7 @@ describe('TaskListContextMenuComponent', () => {
|
||||
});
|
||||
|
||||
it('Should be able to show context menu on task list', async () => {
|
||||
const contextMenu = element.querySelector(`[data-automation-id="text_${fakeGlobalTask.data[0].name}"]`);
|
||||
const contextMenu = element.querySelector(`[data-automation-id="text_${fakeGlobalTask.data[0].name}"]`);
|
||||
const contextActionSpy = spyOn(customComponent.contextAction, 'emit').and.callThrough();
|
||||
contextMenu.dispatchEvent(new MouseEvent('contextmenu', { bubbles: true }));
|
||||
const contextActions = await loader.getAllHarnesses(MatMenuItemHarness);
|
||||
@@ -850,5 +826,5 @@ describe('TaskListContextMenuComponent', () => {
|
||||
expect(await contextActions[1].isDisabled()).toBe(false, 'Cancel Task action not enabled');
|
||||
await contextActions[0].click();
|
||||
expect(contextActionSpy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
14043
package-lock.json
generated
14043
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,7 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alfresco/eslint-plugin-eslint-angular": "file:lib/eslint-angular",
|
||||
"@angular-devkit/architect": "^0.1502.10",
|
||||
"@angular-devkit/build-angular": "15.2.10",
|
||||
"@angular-devkit/core": "15.2.10",
|
||||
@@ -109,9 +110,6 @@
|
||||
"@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",
|
||||
|
Reference in New Issue
Block a user