From faf80375a76a84e75119740096b0b8a4a179b5cf Mon Sep 17 00:00:00 2001 From: Vito Date: Thu, 1 Jun 2017 09:49:25 -0700 Subject: [PATCH] [ADF-707] Ability to select a row on a dynamic table (#1921) --- .../dynamic-table.widget.spec.ts | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) 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 684c609d36..cf8bdeec30 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,7 +17,11 @@ 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 { ActivitiAlfrescoContentService } from '../../../services/activiti-alfresco.service'; import { ComponentFixture, TestBed, async } from '@angular/core/testing'; @@ -30,6 +34,55 @@ import { CoreModule, LogService } from 'ng2-alfresco-core'; import { FormService } from './../../../services/form.service'; import { EcmModelService } from './../../../services/ecm-model.service'; 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 + } + ] +}; let fakeFormField = { id: 'fake-dynamic-table',