diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.html b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.html index 7c5270ba6a..a717509da5 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.html +++ b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.html @@ -4,7 +4,7 @@
|
diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.spec.ts b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.spec.ts
index 10cd6a98c4..41fd04ad4d 100644
--- a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.spec.ts
+++ b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.spec.ts
@@ -17,9 +17,62 @@
import { LogServiceMock } from 'ng2-alfresco-core';
import { DynamicTableWidget } from './dynamic-table.widget';
-import { DynamicTableModel, DynamicTableRow, DynamicTableColumn } from './dynamic-table.widget.model';
+import {
+ DynamicTableModel,
+ DynamicTableRow,
+ DynamicTableColumn
+} from './dynamic-table.widget.model';
import { FormModel, FormFieldTypes, FormFieldModel } from './../core/index';
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
+import { ComponentFixture, TestBed, async } from '@angular/core/testing';
+import { CoreModule } from 'ng2-alfresco-core';
+import { RowEditorComponent } from './editors/row.editor';
+import { DropdownEditorComponent } from './editors/dropdown/dropdown.editor';
+import { DateEditorComponent } from './editors/date/date.editor';
+import { BooleanEditorComponent } from './editors/boolean/boolean.editor';
+import { TextEditorComponent } from './editors/text/text.editor';
+
+
+let fakeFormField = {
+ id: "fake-dynamic-table",
+ name: "fake-label",
+ value: [{ 1: 1, 2: 2, 3: 4 }],
+ required: false,
+ readOnly: false,
+ overrideId: false,
+ colspan: 1,
+ placeholder: null,
+ minLength: 0,
+ maxLength: 0,
+ params: {
+ existingColspan: 1,
+ maxColspan: 1
+ },
+ sizeX: 2,
+ sizeY: 2,
+ row: -1,
+ col: -1,
+ columnDefinitions: [
+ {
+ id: 1,
+ name: 1,
+ type: 'String',
+ visible: true
+ },
+ {
+ id: 2,
+ name: 2,
+ type: 'String',
+ visible: true
+ },
+ {
+ id: 3,
+ name: 3,
+ type: 'String',
+ visible: true
+ }
+ ]
+};
describe('DynamicTableWidget', () => {
@@ -256,4 +309,59 @@ describe('DynamicTableWidget', () => {
let actual = widget.getCellValue(row, column);
expect(actual).toBe('GBP 100');
});
+
+ describe('when template is ready', () => {
+ let dynamicTableWidget: DynamicTableWidget;
+ let fixture: ComponentFixture |