mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2614] Edit icon misses in Info-drawer Assignee (#3145)
* [DW-488] Edit icon misses in Info-drawer Assignee * * Added unit testcases for the recent changes . * * Updated card-view doc for the recent changes made. * * Fixed failing taskHeader testcases
This commit is contained in:
@@ -90,18 +90,32 @@ describe('TaskHeaderComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
let formNameEl = fixture.debugElement.query(By.css('[data-automation-id="header-assignee"] .adf-property-value'));
|
||||
let formNameEl = fixture.debugElement.query(By.css('[data-automation-id="header-assignee"] .adf-textitem-clickable-value'));
|
||||
expect(formNameEl.nativeElement.innerText).toBe('Wilbur Adams');
|
||||
});
|
||||
}));
|
||||
|
||||
it('should display clickable edit icon', async(() => {
|
||||
component.refreshData();
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
let formNameEl = fixture.debugElement.query(By.css('[data-automation-id="header-assignee"] .adf-textitem-clickable-value'));
|
||||
let iconE = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-edit-icon-create"]`));
|
||||
expect(formNameEl).not.toBeNull();
|
||||
expect(iconE).not.toBeNull();
|
||||
expect(formNameEl.nativeElement.innerText).toBe('Wilbur Adams');
|
||||
expect(iconE.nativeElement.innerText.trim()).toBe('create');
|
||||
});
|
||||
}));
|
||||
|
||||
it('should display placeholder if no assignee', async(() => {
|
||||
component.taskDetails.assignee = null;
|
||||
component.refreshData();
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
let valueEl = fixture.debugElement.query(By.css('[data-automation-id="header-assignee"] .adf-property-value'));
|
||||
let valueEl = fixture.debugElement.query(By.css('[data-automation-id="header-assignee"] .adf-textitem-clickable-value'));
|
||||
expect(valueEl.nativeElement.innerText).toBe('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user