d5-testing-library 1.4.0 → 1.5.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.
@@ -154,14 +154,36 @@ declare class FormButton extends DXButton {
154
154
  protected buttonNotDisplayedError(): string;
155
155
  }
156
156
 
157
- declare abstract class AbstractForm extends AbstractPage {
157
+ interface Group {
158
+ isDisplayed(): Promise<boolean>;
159
+ tabClick(name: string): Promise<void>;
160
+ }
161
+
162
+ declare class FormGroup extends AbstractElementWithParent implements Group {
163
+ editor: Group;
164
+ constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
165
+ private initEditor;
166
+ /**
167
+ * Возвращает булевое значение доступна ли группа
168
+ * @example
169
+ * expect(await tableList.group('MainSuperPanel').isDisplayed();
170
+ */
171
+ isDisplayed(): Promise<boolean>;
172
+ /**
173
+ * Происходит клик по табе
174
+ * @example
175
+ * expect(await tableList.group('TabPanel').tabClick(tabName);
176
+ */
177
+ tabClick(name: string): Promise<void>;
178
+ }
179
+
180
+ declare class AbstractForm extends AbstractPage {
158
181
  protected containerCssSelector: string;
182
+ private _formName;
159
183
  protected containerBy: By;
160
- protected popupContainerCssSelector: string;
161
- protected constructor(driver?: WebDriver);
162
- protected isModal(): Promise<boolean>;
163
184
  protected getContainerElement: () => selenium_webdriver.WebElementPromise;
164
- protected get formName(): string;
185
+ set formName(name: string);
186
+ get formName(): string;
165
187
  /**
166
188
  * Возвращает true если форма есть в DOM
167
189
  * @example
@@ -171,6 +193,21 @@ declare abstract class AbstractForm extends AbstractPage {
171
193
  * expect(await formEdit.exists()).toBe(true);
172
194
  */
173
195
  exists(): Promise<boolean>;
196
+ button(name: string): FormButton;
197
+ /**
198
+ * Находит группу на форме по имени
199
+ * @example
200
+ * const formEdit = new MyForm();
201
+ * //...
202
+ * expect(await formEdit.group('Name');
203
+ */
204
+ group(name: string): FormGroup;
205
+ }
206
+
207
+ declare abstract class Form extends AbstractForm {
208
+ protected popupContainerCssSelector: string;
209
+ protected constructor(driver: WebDriver);
210
+ protected isModal(): Promise<boolean>;
174
211
  /**
175
212
  * Получение заголовка на формы
176
213
  * @example
@@ -179,7 +216,16 @@ declare abstract class AbstractForm extends AbstractPage {
179
216
  * expect(await listForm.getTitleText()).toBe('MyFormTitle');
180
217
  */
181
218
  getTitleText(): Promise<string>;
182
- button(name: string): FormButton;
219
+ protected setSubFormMode(): void;
220
+ /**
221
+ * Возвращает сабформу
222
+ * @returns {Promise<ListForm | TreeView | FormEdit>}
223
+ * @example
224
+ * const form = new MyForm();
225
+ * //...
226
+ * expect(await form.subForm(name));
227
+ */
228
+ subForm(name: string): Promise<unknown>;
183
229
  }
184
230
 
185
231
  interface Editor {
@@ -276,26 +322,10 @@ declare class FormField extends AbstractEditor {
276
322
  constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
277
323
  }
278
324
 
279
- interface Group {
280
- isDisplayed(): Promise<boolean>;
281
- }
282
-
283
- declare class FormGroup extends AbstractElementWithParent implements Group {
284
- editor: Group;
285
- constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
286
- private initEditor;
287
- /**
288
- * Возвращает булевое значение доступна ли группа
289
- * @example
290
- * expect(await tableList.group('MainSuperPanel').isDisplayed();
291
- */
292
- isDisplayed(): Promise<boolean>;
293
- }
294
-
295
- declare abstract class FormEdit extends AbstractForm {
325
+ declare class FormEdit extends Form {
296
326
  saveButtonBy: By;
297
327
  closeButtonBy: By;
298
- protected constructor(driver?: WebDriver);
328
+ constructor(driver: WebDriver);
299
329
  /**
300
330
  * Находит поле формы редактирования по имени
301
331
  * @example
@@ -312,14 +342,6 @@ declare abstract class FormEdit extends AbstractForm {
312
342
  * await formEdit.isSaveButtonDisabled();
313
343
  */
314
344
  isSaveButtonDisabled(): Promise<boolean>;
315
- /**
316
- * Находит группу формы редактирования по имени
317
- * @example
318
- * const formEdit = new MyForm();
319
- * //...
320
- * expect(await formEdit.group('Name');
321
- */
322
- group(name: string): FormGroup;
323
345
  /**
324
346
  * Нажатие на кнопку Сохранить
325
347
  * @example
@@ -341,10 +363,10 @@ declare abstract class FormEdit extends AbstractForm {
341
363
  declare class ToolbarMenu extends AbstractElementWithParent {
342
364
  private readonly _formName;
343
365
  constructor(parentCssSelector: string, formName: string, name: string, driver?: WebDriver);
344
- protected toggle(): Promise<void>;
345
- protected getCssSelectorToButton(name: string): By;
346
- protected buttonNotDisplayedError(name: string): string;
347
- protected goToButton(name: string, selector: By): Promise<void>;
366
+ private openDropdownMenu;
367
+ private getCssSelectorToButton;
368
+ private buttonNotDisplayedError;
369
+ private goToButton;
348
370
  clickButton(name: string | string[]): Promise<void>;
349
371
  clickButtonByTitle(title: string | string[]): Promise<void>;
350
372
  }
@@ -522,9 +544,9 @@ declare class FilterPanel extends AbstractElement {
522
544
  close(): Promise<void>;
523
545
  }
524
546
 
525
- declare abstract class ListForm extends AbstractForm {
547
+ declare class ListForm extends Form {
526
548
  protected headerCssSelector: string;
527
- protected constructor(driver?: WebDriver);
549
+ constructor(driver: WebDriver);
528
550
  /**
529
551
  * Находит таблицу
530
552
  * @example
@@ -533,14 +555,6 @@ declare abstract class ListForm extends AbstractForm {
533
555
  * expect(listForm.table());
534
556
  */
535
557
  table(): Table;
536
- /**
537
- * Находит группу на лист форме по имени
538
- * @example
539
- * const formEdit = new MyForm();
540
- * //...
541
- * expect(await formEdit.group('Name');
542
- */
543
- group(name: string): FormGroup;
544
558
  /**
545
559
  * Находит таблицу
546
560
  * @example
@@ -568,8 +582,8 @@ declare abstract class ListForm extends AbstractForm {
568
582
  get filterPanel(): FilterPanel;
569
583
  }
570
584
 
571
- declare abstract class TreeView extends ListForm {
572
- protected constructor(driver?: WebDriver);
585
+ declare class TreeView extends ListForm {
586
+ constructor(driver: WebDriver);
573
587
  }
574
588
 
575
589
  declare class DialogButton extends AbstractButton implements Button {