d5-testing-library 1.3.1 → 1.4.0
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.
- package/dist/cjs/d5-testing-library.cjs +404 -143
- package/dist/d5-testing-library.d.ts +55 -22
- package/dist/d5-testing-library.legacy-esm.js +401 -142
- package/dist/d5-testing-library.mjs +401 -142
- package/package.json +1 -1
|
@@ -126,6 +126,34 @@ declare class SubsystemsPanel extends AbstractElement {
|
|
|
126
126
|
headerTitle(): Promise<string>;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
declare abstract class AbstractElementWithParent extends AbstractElement {
|
|
130
|
+
protected parentCssSelector: string;
|
|
131
|
+
constructor(parentCssSelector: string, elementCssSelector: string, driver?: WebDriver);
|
|
132
|
+
protected getFullCssSelector(): string;
|
|
133
|
+
isReadonly(): Promise<boolean>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface Button {
|
|
137
|
+
click(): Promise<void>;
|
|
138
|
+
isDisabled(): Promise<boolean>;
|
|
139
|
+
}
|
|
140
|
+
declare abstract class AbstractButton extends AbstractElementWithParent implements Button {
|
|
141
|
+
protected constructor(parentCssSelector: string, elementCssSelector: string, driver?: WebDriver);
|
|
142
|
+
protected abstract buttonNotDisplayedError(): string;
|
|
143
|
+
click(): Promise<void>;
|
|
144
|
+
isDisabled(): Promise<boolean>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare abstract class DXButton extends AbstractButton {
|
|
148
|
+
protected getText(): Promise<string>;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare class FormButton extends DXButton {
|
|
152
|
+
private readonly name;
|
|
153
|
+
constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
|
|
154
|
+
protected buttonNotDisplayedError(): string;
|
|
155
|
+
}
|
|
156
|
+
|
|
129
157
|
declare abstract class AbstractForm extends AbstractPage {
|
|
130
158
|
protected containerCssSelector: string;
|
|
131
159
|
protected containerBy: By;
|
|
@@ -151,13 +179,7 @@ declare abstract class AbstractForm extends AbstractPage {
|
|
|
151
179
|
* expect(await listForm.getTitleText()).toBe('MyFormTitle');
|
|
152
180
|
*/
|
|
153
181
|
getTitleText(): Promise<string>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
declare abstract class AbstractElementWithParent extends AbstractElement {
|
|
157
|
-
protected parentCssSelector: string;
|
|
158
|
-
constructor(parentCssSelector: string, elementCssSelector: string, driver?: WebDriver);
|
|
159
|
-
protected getFullCssSelector(): string;
|
|
160
|
-
isReadonly(): Promise<boolean>;
|
|
182
|
+
button(name: string): FormButton;
|
|
161
183
|
}
|
|
162
184
|
|
|
163
185
|
interface Editor {
|
|
@@ -167,6 +189,19 @@ interface Editor {
|
|
|
167
189
|
clear?(): Promise<void>;
|
|
168
190
|
isReadonly?(): Promise<boolean>;
|
|
169
191
|
}
|
|
192
|
+
declare enum ControlClass {
|
|
193
|
+
Text = "text-control",
|
|
194
|
+
TextArea = "text-area-control",
|
|
195
|
+
Number = "number-control",
|
|
196
|
+
CheckBox = "check-box",
|
|
197
|
+
Multiselect = "multi-select-control",
|
|
198
|
+
Select = "select-control",
|
|
199
|
+
Switch = "switch-control",
|
|
200
|
+
Date = "date-control",
|
|
201
|
+
SingleDateRange = "single-date-range-control",
|
|
202
|
+
BooleanSelector = "buttons-group",
|
|
203
|
+
ButtonGroup = "button-group-field"
|
|
204
|
+
}
|
|
170
205
|
|
|
171
206
|
interface ClearStrategy {
|
|
172
207
|
clear(editor: Editor): Promise<void>;
|
|
@@ -303,17 +338,6 @@ declare abstract class FormEdit extends AbstractForm {
|
|
|
303
338
|
closeButtonClick(): Promise<void>;
|
|
304
339
|
}
|
|
305
340
|
|
|
306
|
-
interface Button {
|
|
307
|
-
click(): Promise<void>;
|
|
308
|
-
isDisabled(): Promise<boolean>;
|
|
309
|
-
}
|
|
310
|
-
declare abstract class AbstractButton extends AbstractElementWithParent implements Button {
|
|
311
|
-
protected constructor(parentCssSelector: string, elementCssSelector: string, driver?: WebDriver);
|
|
312
|
-
protected abstract buttonNotDisplayedError(): string;
|
|
313
|
-
click(): Promise<void>;
|
|
314
|
-
isDisabled(): Promise<boolean>;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
341
|
declare class ToolbarMenu extends AbstractElementWithParent {
|
|
318
342
|
private readonly _formName;
|
|
319
343
|
constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
|
|
@@ -342,13 +366,15 @@ declare class Cell extends AbstractElementWithParent {
|
|
|
342
366
|
constructor(parentCssSelector: string, getCellIndex: () => Promise<number>, index?: number, driver?: WebDriver);
|
|
343
367
|
private set index(value);
|
|
344
368
|
private getBooleanValue;
|
|
369
|
+
private getTagsValue;
|
|
345
370
|
getElement(): Promise<WebElement>;
|
|
346
|
-
getValue(): Promise<string | 1 | 0>;
|
|
371
|
+
getValue(): Promise<string | 1 | 0 | string[]>;
|
|
347
372
|
getIndex(): number;
|
|
348
373
|
}
|
|
349
374
|
|
|
350
375
|
interface ConstructorParams {
|
|
351
376
|
parentCssSelector: string;
|
|
377
|
+
headerCssSelector?: string;
|
|
352
378
|
name?: string;
|
|
353
379
|
caption?: string;
|
|
354
380
|
index?: number;
|
|
@@ -358,7 +384,8 @@ declare class Column extends AbstractElementWithParent {
|
|
|
358
384
|
private _index;
|
|
359
385
|
private _caption;
|
|
360
386
|
private _name;
|
|
361
|
-
|
|
387
|
+
protected headerCssSelector: string | undefined;
|
|
388
|
+
constructor({ parentCssSelector, headerCssSelector, name, caption, index, driver }: ConstructorParams);
|
|
362
389
|
private set index(value);
|
|
363
390
|
private get index();
|
|
364
391
|
getElement(): Promise<WebElement>;
|
|
@@ -396,7 +423,8 @@ declare class Row extends AbstractElementWithParent {
|
|
|
396
423
|
|
|
397
424
|
declare class Table extends AbstractElementWithParent {
|
|
398
425
|
protected formName: string;
|
|
399
|
-
|
|
426
|
+
protected headerCssSelector: string;
|
|
427
|
+
constructor(parentCssSelector: string, headerCssSelector: string, formName: string, driver?: WebDriver);
|
|
400
428
|
private getColumnBy;
|
|
401
429
|
getRowByIndex(index: number): Row;
|
|
402
430
|
getColumnByIndex(index: number): Column;
|
|
@@ -495,6 +523,7 @@ declare class FilterPanel extends AbstractElement {
|
|
|
495
523
|
}
|
|
496
524
|
|
|
497
525
|
declare abstract class ListForm extends AbstractForm {
|
|
526
|
+
protected headerCssSelector: string;
|
|
498
527
|
protected constructor(driver?: WebDriver);
|
|
499
528
|
/**
|
|
500
529
|
* Находит таблицу
|
|
@@ -539,6 +568,10 @@ declare abstract class ListForm extends AbstractForm {
|
|
|
539
568
|
get filterPanel(): FilterPanel;
|
|
540
569
|
}
|
|
541
570
|
|
|
571
|
+
declare abstract class TreeView extends ListForm {
|
|
572
|
+
protected constructor(driver?: WebDriver);
|
|
573
|
+
}
|
|
574
|
+
|
|
542
575
|
declare class DialogButton extends AbstractButton implements Button {
|
|
543
576
|
private readonly text;
|
|
544
577
|
constructor(parentCssSelector: string, text: string, driver?: WebDriver);
|
|
@@ -555,4 +588,4 @@ declare class Dialog extends AbstractElement {
|
|
|
555
588
|
button(text: string): DialogButton;
|
|
556
589
|
}
|
|
557
590
|
|
|
558
|
-
export { AbstractPage, Dialog, Editor, FilterPanel, FormEdit, FormField, FormFilterField, ListForm, LoginPage, NumberEditor, PanelFilterField, SubsystemsPanel, TextEditor, byTestId, byTestIdCssSelector, click, config, createDriver, editorFactory, elementIsNotPresent, readonlyLocator, signIn, wait, waitElementIsVisible };
|
|
591
|
+
export { AbstractPage, ControlClass, Dialog, Editor, FilterPanel, FormEdit, FormField, FormFilterField, ListForm, LoginPage, NumberEditor, PanelFilterField, SubsystemsPanel, TextEditor, TreeView, byTestId, byTestIdCssSelector, click, config, createDriver, editorFactory, elementIsNotPresent, readonlyLocator, signIn, wait, waitElementIsVisible };
|