-
{{ property.label | translate }}
-
-
-
+
- {{ property.displayValue | async | translate }}
-
-
-
- {{ property.label | translate }}
-
-
-
- {{ 'CORE.CARDVIEW.NONE' | translate }}
-
- {{ option.label | translate }}
-
-
-
-
-
+ {{ property.label | translate }}
+
+
+
+
+ {{ property.label | translate }}
+
+
+
+ {{ 'CORE.CARDVIEW.NONE' | translate }}
+
+ {{ option.label | translate }}
+
+
+
{
let loader: HarnessLoader;
@@ -85,7 +85,8 @@ describe('CardViewSelectItemComponent', () => {
editable: false
});
fixture.detectChanges();
- expect(testingUtils.getInnerTextByCSS('.adf-property-label')).toBe('Select box label');
+
+ expect(testingUtils.getInnerTextByDataAutomationId('card-select-label-key')).toBe('Select box label');
});
it('should render readOnly value is editable property is FALSE', () => {
@@ -109,7 +110,9 @@ describe('CardViewSelectItemComponent', () => {
});
fixture.detectChanges();
- expect(getReadOnlyElement().nativeElement.title).toBe('Two');
+
+ const inputEl = getReadOnlyElement().nativeElement as HTMLInputElement;
+ expect(inputEl.value).toBe('Two');
});
it('should be possible edit selectBox item', async () => {
@@ -284,7 +287,9 @@ describe('CardViewSelectItemComponent', () => {
const autocompleteValueSpy = spyOn(cardViewUpdateService.autocompleteInputValue$, 'next');
component.editedValue = '';
component.editable = true;
- component.ngOnChanges({ property: { firstChange: true } } as any);
+ component.ngOnChanges({
+ property: new SimpleChange(undefined, component.property, true)
+ });
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 2655e74a16..ab48954151 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.getInnerTextByCSS('.adf-property-value');
+ const getPropertyValueText = (): string => testingUtils.getInputByCSS('.adf-property-value').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 c1e02b7b5e..41bdcfc4d1 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.innerText.trim()).toBe('Mar 9, 2019');
+ expect(valueEl.nativeElement.value.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.innerText.trim()).toBe('Mar 9, 2019');
+ expect(valueEl.nativeElement.value.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.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');
+ 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');
});
});
});
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 e44a64fb68..77b7043b3e 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.innerText.trim()).toBe('Monday, December 17, 2018 at 12:00:00 AM GMT+00:00');
+ expect(createdDateElement.nativeElement.value.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 dc0aaf3dab..3483c63ed6 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,9 +207,7 @@ describe('TaskAttachmentList', () => {
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]').value.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 ac64775349..1ae7eddace 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.innerText).toBe('Nov 3, 2016');
+ expect(valueEl.value).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.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT');
+ expect(valueEl.value).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.innerText).toBe('Nov 3, 2016');
+ expect(valueEl.value).toBe('Nov 3, 2016');
});
it('should display started by', async () => {