diff --git a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.html b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.html
index c9fcddfa74..aa09c74d5e 100644
--- a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.html
+++ b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.html
@@ -1,50 +1,29 @@
+
+ {{ property.label | translate }}
+
-
-
- {{ property.label | translate }}
-
-
-
-
-
-
-
+
+
+ {{ property.displayValue }}
+
+
-
-
- {{ property.default | translate }}
-
+
+ {{ property.default | translate }}
+
-
-
-
+
+
+ {{ propertyValue }}
+ cancel
+
+
+
+
diff --git a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts
index 297678b8da..5743f89390 100644
--- a/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts
+++ b/lib/core/src/lib/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts
@@ -64,14 +64,14 @@ describe('CardViewDateItemComponent', () => {
afterEach(() => fixture.destroy());
const getPropertyLabel = (): string => testingUtils.getInnerTextByCSS('.adf-property-label');
- const getPropertyInputValue = (): HTMLInputElement => testingUtils.getInputByCSS('.adf-property-value');
+ const getPropertyValue = (): string => testingUtils.getInnerTextByCSS('.adf-property-value');
const getDateTime = (): string => testingUtils.getInnerTextByCSS('.adf-datepicker-span-button');
it('should render the label and value', () => {
fixture.detectChanges();
expect(getPropertyLabel()).toBe('Date label');
- expect(getPropertyInputValue().value.trim()).toBe('Jul 10, 2017');
+ expect(getPropertyValue().trim()).toBe('Jul 10, 2017');
});
it('should NOT render the default as value if the value is empty, editable:false and displayEmpty is false', () => {
@@ -87,7 +87,6 @@ describe('CardViewDateItemComponent', () => {
component.displayEmpty = false;
fixture.detectChanges();
- const getPropertyValue = (): string => testingUtils.getInnerTextByCSS('.adf-property-value');
expect(getPropertyValue().trim()).toBe('');
});
@@ -104,7 +103,7 @@ describe('CardViewDateItemComponent', () => {
component.displayEmpty = true;
fixture.detectChanges();
- expect(getPropertyInputValue().value.trim()).toBe('FAKE-DEFAULT-KEY');
+ expect(getPropertyValue().trim()).toBe('FAKE-DEFAULT-KEY');
});
it('should render the default as value if the value is empty and editable:true', () => {
@@ -214,7 +213,7 @@ describe('CardViewDateItemComponent', () => {
component.editable = false;
fixture.detectChanges();
- testingUtils.doubleClickByDataAutomationId(`card-${component.property.type}-value-${component.property.key}`);
+ testingUtils.doubleClickByDataAutomationId(`card-dateitem-${component.property.key}`);
fixture.detectChanges();
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Jul 10, 2017', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE');
diff --git a/lib/core/src/lib/card-view/components/card-view-selectitem/card-view-selectitem.component.html b/lib/core/src/lib/card-view/components/card-view-selectitem/card-view-selectitem.component.html
index 3e13c80050..1a416d2731 100644
--- a/lib/core/src/lib/card-view/components/card-view-selectitem/card-view-selectitem.component.html
+++ b/lib/core/src/lib/card-view/components/card-view-selectitem/card-view-selectitem.component.html
@@ -1,51 +1,48 @@
-
-
- {{ property.label | translate }}
-
- {{ property.label | translate }}
+
+
+
-
-
- {{ property.label | translate }}
-
-
-
- {{ 'CORE.CARDVIEW.NONE' | translate }}
-
- {{ option.label | translate }}
-
-
-
+ {{ property.displayValue | async | translate }}
+
+
+
+ {{ property.label | translate }}
+
+
+
+ {{ 'CORE.CARDVIEW.NONE' | translate }}
+
+ {{ option.label | translate }}
+
+
+
+
+
{
let loader: HarnessLoader;
@@ -85,8 +85,7 @@ describe('CardViewSelectItemComponent', () => {
editable: false
});
fixture.detectChanges();
-
- expect(testingUtils.getInnerTextByDataAutomationId('card-select-label-key')).toBe('Select box label');
+ expect(testingUtils.getInnerTextByCSS('.adf-property-label')).toBe('Select box label');
});
it('should render readOnly value is editable property is FALSE', () => {
@@ -110,9 +109,7 @@ describe('CardViewSelectItemComponent', () => {
});
fixture.detectChanges();
-
- const inputEl = getReadOnlyElement().nativeElement as HTMLInputElement;
- expect(inputEl.value).toBe('Two');
+ expect(getReadOnlyElement().nativeElement.title).toBe('Two');
});
it('should be possible edit selectBox item', async () => {
@@ -287,9 +284,7 @@ describe('CardViewSelectItemComponent', () => {
const autocompleteValueSpy = spyOn(cardViewUpdateService.autocompleteInputValue$, 'next');
component.editedValue = '';
component.editable = true;
- component.ngOnChanges({
- property: new SimpleChange(undefined, component.property, true)
- });
+ component.ngOnChanges({ property: { firstChange: true } } as any);
fixture.detectChanges();
component.autocompleteControl.setValue('new value');
diff --git a/lib/core/src/lib/card-view/components/card-view/card-view.component.spec.ts b/lib/core/src/lib/card-view/components/card-view/card-view.component.spec.ts
index ab48954151..2655e74a16 100644
--- a/lib/core/src/lib/card-view/components/card-view/card-view.component.spec.ts
+++ b/lib/core/src/lib/card-view/components/card-view/card-view.component.spec.ts
@@ -53,7 +53,7 @@ describe('CardViewComponent', () => {
const getPropertyLabel = (): string => testingUtils.getInnerTextByCSS('.adf-property-label');
const getPropertyValue = (): string => testingUtils.getByCSS('.adf-property-value').nativeElement.value;
- const getPropertyValueText = (): string => testingUtils.getInputByCSS('.adf-property-value').value;
+ const getPropertyValueText = (): string => testingUtils.getInnerTextByCSS('.adf-property-value');
const getPropertyValueByDataAutomationId = (dataAutomationId: string): string =>
testingUtils.getByDataAutomationId(dataAutomationId).nativeElement.value;
diff --git a/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.spec.ts
index 41bdcfc4d1..c1e02b7b5e 100644
--- a/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.spec.ts
+++ b/lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.spec.ts
@@ -111,7 +111,7 @@ describe('ProcessHeaderCloudComponent', () => {
await fixture.whenStable();
const valueEl = fixture.debugElement.query(By.css('[data-automation-id="header-startDate"] .adf-property-value'));
- expect(valueEl.nativeElement.value.trim()).toBe('Mar 9, 2019');
+ expect(valueEl.nativeElement.innerText.trim()).toBe('Mar 9, 2019');
});
it('should display lastModified date', async () => {
@@ -121,7 +121,7 @@ describe('ProcessHeaderCloudComponent', () => {
await fixture.whenStable();
const valueEl = fixture.debugElement.query(By.css('[data-automation-id="header-lastModified"] .adf-property-value'));
- expect(valueEl.nativeElement.value.trim()).toBe('Mar 9, 2019');
+ expect(valueEl.nativeElement.innerText.trim()).toBe('Mar 9, 2019');
});
it('should display parentId', async () => {
@@ -216,8 +216,8 @@ describe('ProcessHeaderCloudComponent', () => {
const lastModifiedElement = fixture.debugElement.query(By.css('[data-automation-id="header-lastModified"] .adf-property-value'));
expect(component.dateFormat).toEqual('full');
- expect(startedDateElement.nativeElement.value.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
- expect(lastModifiedElement.nativeElement.value.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
+ expect(startedDateElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
+ expect(lastModifiedElement.nativeElement.innerText.trim()).toBe('Saturday, March 9, 2019 at 12:00:00 AM GMT+00:00');
});
});
});
diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
index 77b7043b3e..e44a64fb68 100644
--- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
+++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts
@@ -506,7 +506,7 @@ describe('TaskHeaderCloudComponent', () => {
const createdDateElement = fixture.debugElement.query(By.css('[data-automation-id="header-created"] .adf-property-value'));
expect(component.dateFormat).toEqual('full');
- expect(createdDateElement.nativeElement.value.trim()).toBe('Monday, December 17, 2018 at 12:00:00 AM GMT+00:00');
+ expect(createdDateElement.nativeElement.innerText.trim()).toBe('Monday, December 17, 2018 at 12:00:00 AM GMT+00:00');
});
});
diff --git a/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.spec.ts b/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.spec.ts
index 3483c63ed6..dc0aaf3dab 100644
--- a/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.spec.ts
+++ b/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.spec.ts
@@ -207,7 +207,9 @@ describe('TaskAttachmentList', () => {
fixture.whenStable().then(() => {
fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('div[adf-empty-list-header]').value.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'
+ );
});
});
diff --git a/lib/process-services/src/lib/process-list/components/process-instance-header/process-instance-header.component.spec.ts b/lib/process-services/src/lib/process-list/components/process-instance-header/process-instance-header.component.spec.ts
index 1ae7eddace..ac64775349 100644
--- a/lib/process-services/src/lib/process-list/components/process-instance-header/process-instance-header.component.spec.ts
+++ b/lib/process-services/src/lib/process-list/components/process-instance-header/process-instance-header.component.spec.ts
@@ -64,7 +64,7 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges();
fixture.detectChanges();
const valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-dateitem-ended"]');
- expect(valueEl.value).toBe('Nov 3, 2016');
+ expect(valueEl.innerText).toBe('Nov 3, 2016');
});
it('should display placeholder if no due date', () => {
@@ -72,7 +72,7 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges();
fixture.detectChanges();
const valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-dateitem-ended"]');
- expect(valueEl.value).toBe('ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT');
+ expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT');
});
it('should display process category', async () => {
@@ -98,7 +98,7 @@ describe('ProcessInstanceHeaderComponent', () => {
component.ngOnChanges();
fixture.detectChanges();
const valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-dateitem-created"]');
- expect(valueEl.value).toBe('Nov 3, 2016');
+ expect(valueEl.innerText).toBe('Nov 3, 2016');
});
it('should display started by', async () => {