@alfresco/adf-core 7.0.0-alpha.8-13005755934 → 7.0.0-alpha.8-13009426269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,9 @@ import { OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { FormService } from '../../../services/form.service';
4
4
  import { WidgetComponent } from '../widget.component';
5
+ import { ReactiveFormWidget } from '../reactive-widget.interface';
5
6
  import * as i0 from "@angular/core";
6
- export declare class DateTimeWidgetComponent extends WidgetComponent implements OnInit {
7
+ export declare class DateTimeWidgetComponent extends WidgetComponent implements OnInit, ReactiveFormWidget {
7
8
  minDate: Date;
8
9
  maxDate: Date;
9
10
  datetimeInputControl: FormControl<Date>;
@@ -18,3 +18,4 @@ export * from './core.testing.module';
18
18
  export * from './core.story.module';
19
19
  export * from './noop-translate.module';
20
20
  export * from './noop-auth.module';
21
+ export * from './unit-testing-utils';
@@ -0,0 +1,134 @@
1
+ /*!
2
+ * @license
3
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { HarnessLoader, TestElement, TestKey } from '@angular/cdk/testing';
18
+ import { DebugElement, Type } from '@angular/core';
19
+ import { MatOptionHarness } from '@angular/material/core/testing';
20
+ import { MatChipHarness, MatChipListboxHarness } from '@angular/material/chips/testing';
21
+ import { MatButtonHarness } from '@angular/material/button/testing';
22
+ import { MatIconHarness } from '@angular/material/icon/testing';
23
+ import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
24
+ import { MatErrorHarness, MatFormFieldHarness } from '@angular/material/form-field/testing';
25
+ import { MatInputHarness } from '@angular/material/input/testing';
26
+ import { ComponentFixture } from '@angular/core/testing';
27
+ import { MatTabHarness } from '@angular/material/tabs/testing';
28
+ export declare class UnitTestingUtils {
29
+ private debugElement?;
30
+ private loader?;
31
+ constructor(debugElement?: DebugElement, loader?: HarnessLoader);
32
+ setDebugElement(debugElement: DebugElement): void;
33
+ setLoader(loader: HarnessLoader): void;
34
+ getByCSS(selector: string): DebugElement;
35
+ getAllByCSS(selector: string): DebugElement[];
36
+ getInnerTextByCSS(selector: string): string;
37
+ getByDataAutomationId(dataAutomationId: string): DebugElement;
38
+ getByDataAutomationClass(dataAutomationClass: string): DebugElement;
39
+ getInnerTextByDataAutomationId(dataAutomationId: string): string;
40
+ getByDirective(directive: Type<any>): DebugElement;
41
+ /** Perform actions */
42
+ clickByCSS(selector: string): void;
43
+ clickByDataAutomationId(dataAutomationId: string): void;
44
+ doubleClickByDataAutomationId(dataAutomationId: string): void;
45
+ blurByCSS(selector: string): void;
46
+ hoverOverByCSS(selector: string): void;
47
+ hoverOverByDataAutomationId(dataAutomationId: string): void;
48
+ mouseLeaveByCSS(selector: string): void;
49
+ mouseLeaveByDataAutomationId(dataAutomationId: string): void;
50
+ keyBoardEventByCSS(selector: string, event: 'keyup' | 'keydown', code: string, key: string): void;
51
+ dispatchCustomEventByCSS(selector: string, eventName: string): void;
52
+ /** Input related methods */
53
+ getInputByCSS(selector: string): HTMLInputElement;
54
+ getInputByDataAutomationId(dataAutomationId: string): HTMLInputElement;
55
+ fillInputByCSS(selector: string, value: string): void;
56
+ fillInputByDataAutomationId(dataAutomationId: string, value: any): void;
57
+ /** MatButton related methods */
58
+ getMatButton(): Promise<MatButtonHarness>;
59
+ getMatButtonByCSS(selector: string): Promise<MatButtonHarness>;
60
+ getMatButtonByDataAutomationId(dataAutomationId: string): Promise<MatButtonHarness>;
61
+ checkIfMatButtonExists(): Promise<boolean>;
62
+ checkIfMatButtonExistsWithDataAutomationId(dataAutomationId: string): Promise<boolean>;
63
+ clickMatButton(): Promise<void>;
64
+ clickMatButtonByCSS(selector: string): Promise<void>;
65
+ clickMatButtonByDataAutomationId(dataAutomationId: string): Promise<void>;
66
+ sendKeysToMatButton(keys: (string | TestKey)[]): Promise<void>;
67
+ /** MatCheckbox related methods */
68
+ getMatCheckbox(): Promise<MatCheckboxHarness>;
69
+ getMatCheckboxByDataAutomationId(dataAutomationId: string): Promise<MatCheckboxHarness>;
70
+ getMatCheckboxHost(): Promise<TestElement>;
71
+ getAllMatCheckboxes(): Promise<MatCheckboxHarness[]>;
72
+ checkIfMatCheckboxIsChecked(): Promise<boolean>;
73
+ checkIfMatCheckboxesHaveClass(className: string): Promise<boolean>;
74
+ hoverOverMatCheckbox(): Promise<void>;
75
+ /** MatIcon related methods */
76
+ getMatIconOrNull(): Promise<MatIconHarness>;
77
+ getMatIconWithAncestorByDataAutomationId(dataAutomationId: string): Promise<MatIconHarness>;
78
+ getMatIconWithAncestorByCSS(selector: string): Promise<MatIconHarness>;
79
+ getMatIconWithAncestorByCSSAndName(selector: string, name: string): Promise<MatIconHarness>;
80
+ checkIfMatIconExistsWithAncestorByDataAutomationId(dataAutomationId: string): Promise<boolean>;
81
+ checkIfMatIconExistsWithAncestorByCSSAndName(selector: string, name: string): Promise<boolean>;
82
+ clickMatIconWithAncestorByDataAutomationId(dataAutomationId: string): Promise<void>;
83
+ /** MatSelect related methods */
84
+ getMatSelectOptions(isOpened?: boolean): Promise<MatOptionHarness[]>;
85
+ getMatSelectHost(): Promise<TestElement>;
86
+ checkIfMatSelectExists(): Promise<boolean>;
87
+ openMatSelect(): Promise<void>;
88
+ /** MatChips related methods */
89
+ getMatChipByDataAutomationId(dataAutomationId: string): Promise<MatChipHarness>;
90
+ checkIfMatChipExistsWithDataAutomationId(dataAutomationId: string): Promise<boolean>;
91
+ clickMatChip(dataAutomationId: string): Promise<void>;
92
+ getMatChips(): Promise<MatChipHarness[]>;
93
+ /** MatChipListbox related methods */
94
+ getMatChipListboxByDataAutomationId(dataAutomationId: string): Promise<MatChipListboxHarness>;
95
+ clickMatChipListbox(dataAutomationId: string): Promise<void>;
96
+ /** MatChipGrid related methods */
97
+ checkIfMatChipGridExists(): Promise<boolean>;
98
+ /** MatFromField related methods */
99
+ getMatFormField(): Promise<MatFormFieldHarness>;
100
+ getMatFormFieldByCSS(selector: string): Promise<MatFormFieldHarness>;
101
+ /** MatInput related methods */
102
+ getMatInput(): Promise<MatInputHarness>;
103
+ getMatInputByCSS(selector: string): Promise<MatInputHarness>;
104
+ getMatInputByDataAutomationId(dataAutomationId: string): Promise<MatInputHarness>;
105
+ getMatInputByPlaceholder(placeholder: string): Promise<MatInputHarness>;
106
+ getMatInputHost(): Promise<TestElement>;
107
+ checkIfMatInputExists(): Promise<boolean>;
108
+ checkIfMatInputExistsWithCSS(selector: string): Promise<boolean>;
109
+ checkIfMatInputExistsWithDataAutomationId(dataAutomationId: string): Promise<boolean>;
110
+ checkIfMatInputExistsWithPlaceholder(placeholder: string): Promise<boolean>;
111
+ clickMatInput(): Promise<void>;
112
+ fillMatInput(value: string): Promise<void>;
113
+ fillMatInputByCSS(selector: string, value: string): Promise<void>;
114
+ fillMatInputByDataAutomationId(dataAutomationId: string, value: string): Promise<void>;
115
+ focusMatInput(): Promise<void>;
116
+ blurMatInput(): Promise<void>;
117
+ getMatInputValue(): Promise<string>;
118
+ getMatInputValueByDataAutomationId(dataAutomationId: string): Promise<string>;
119
+ sendKeysToMatInput(keys: (string | TestKey)[]): Promise<void>;
120
+ /** MatAutoComplete related methods */
121
+ typeAndGetOptionsForMatAutoComplete(fixture: ComponentFixture<any>, value: string): Promise<MatOptionHarness[]>;
122
+ /** MatError related methods */
123
+ getMatErrorByCSS(selector: string): Promise<MatErrorHarness>;
124
+ getMatErrorByDataAutomationId(dataAutomationId: string): Promise<MatErrorHarness>;
125
+ /** MatTabGroup related methods */
126
+ getSelectedTabFromMatTabGroup(): Promise<MatTabHarness>;
127
+ getSelectedTabLabelFromMatTabGroup(): Promise<string>;
128
+ /** MatToolbar related methods */
129
+ getMatToolbarHost(): Promise<TestElement>;
130
+ /** MatSnackbar related methods */
131
+ checkIfMatSnackbarExists(): Promise<boolean>;
132
+ /** MatProgressBar related methods */
133
+ getMatProgressBarHost(): Promise<TestElement>;
134
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alfresco/adf-core",
3
3
  "description": "Alfresco ADF core",
4
- "version": "7.0.0-alpha.8-13005755934",
4
+ "version": "7.0.0-alpha.8-13009426269",
5
5
  "author": "Hyland Software, Inc. and its affiliates",
6
6
  "repository": {
7
7
  "type": "git",
@@ -75,8 +75,8 @@
75
75
  "@angular/router": "16.2.9",
76
76
  "@mat-datetimepicker/core": "12.0.1",
77
77
  "@ngx-translate/core": "^14.0.0",
78
- "@alfresco/js-api": ">=8.0.0-alpha.8-13005755934",
79
- "@alfresco/adf-extensions": ">=7.0.0-alpha.8-13005755934",
78
+ "@alfresco/js-api": ">=8.0.0-alpha.8-13009426269",
79
+ "@alfresco/adf-extensions": ">=7.0.0-alpha.8-13009426269",
80
80
  "minimatch-browser": "1.0.0",
81
81
  "pdfjs-dist": "3.3.122",
82
82
  "ts-morph": "^20.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alfresco/adf-core",
3
3
  "description": "Alfresco ADF core",
4
- "version": "7.0.0-alpha.8-13005755934",
4
+ "version": "7.0.0-alpha.8-13009426269",
5
5
  "author": "Hyland Software, Inc. and its affiliates",
6
6
  "repository": {
7
7
  "type": "git",
@@ -38,8 +38,8 @@
38
38
  "@angular/router": "16.2.9",
39
39
  "@mat-datetimepicker/core": "12.0.1",
40
40
  "@ngx-translate/core": "^14.0.0",
41
- "@alfresco/js-api": ">=8.0.0-alpha.8-13005755934",
42
- "@alfresco/adf-extensions": ">=7.0.0-alpha.8-13005755934",
41
+ "@alfresco/js-api": ">=8.0.0-alpha.8-13009426269",
42
+ "@alfresco/adf-extensions": ">=7.0.0-alpha.8-13009426269",
43
43
  "minimatch-browser": "1.0.0",
44
44
  "pdfjs-dist": "3.3.122",
45
45
  "ts-morph": "^20.0.0"
@@ -3,13 +3,13 @@
3
3
  "schematics": {
4
4
  "move-out-alfresco-api": {
5
5
  "description": "Update alfresco-api imports",
6
- "version": "7.0.0-alpha.8-13005755934",
6
+ "version": "7.0.0-alpha.8-13009426269",
7
7
  "factory": "./7_0_0/index#updateAlfrescoApiImports"
8
8
  }
9
9
  },
10
10
  "packageJsonUpdates": {
11
11
  "move-out-alfresco-api": {
12
- "version": "7.0.0-alpha.8-13005755934",
12
+ "version": "7.0.0-alpha.8-13009426269",
13
13
  "packages": {
14
14
  "ts-morph": {
15
15
  "version": "^20.0.0",
@@ -17,27 +17,27 @@
17
17
  "addToPackageJson": "devDependencies"
18
18
  },
19
19
  "@alfresco/adf-content-services": {
20
- "version": "7.0.0-alpha.8-13005755934",
20
+ "version": "7.0.0-alpha.8-13009426269",
21
21
  "alwaysAddToPackageJson": false
22
22
  },
23
23
  "@alfresco/adf-extensions": {
24
- "version": "7.0.0-alpha.8-13005755934",
24
+ "version": "7.0.0-alpha.8-13009426269",
25
25
  "alwaysAddToPackageJson": false
26
26
  },
27
27
  "@alfresco/adf-process-services-cloud": {
28
- "version": "7.0.0-alpha.8-13005755934",
28
+ "version": "7.0.0-alpha.8-13009426269",
29
29
  "alwaysAddToPackageJson": false
30
30
  },
31
31
  "@alfresco/adf-process-services": {
32
- "version": "7.0.0-alpha.8-13005755934",
32
+ "version": "7.0.0-alpha.8-13009426269",
33
33
  "alwaysAddToPackageJson": false
34
34
  },
35
35
  "@alfresco/eslint-plugin-eslint-angular": {
36
- "version": "7.0.0-alpha.8-13005755934",
36
+ "version": "7.0.0-alpha.8-13009426269",
37
37
  "alwaysAddToPackageJson": false
38
38
  },
39
39
  "@alfresco/js-api": {
40
- "version": "8.0.0-alpha.8-13005755934",
40
+ "version": "8.0.0-alpha.8-13009426269",
41
41
  "alwaysAddToPackageJson": false
42
42
  }
43
43
  }