d5-testing-library 2.0.0-alpha.16 → 2.0.0-alpha.17

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FormEdit
3
- } from "./chunk-LNXRNPAK.mjs";
3
+ } from "./chunk-YL3AEJ7O.mjs";
4
4
  export {
5
5
  FormEdit as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ListForm
3
- } from "./chunk-LNXRNPAK.mjs";
3
+ } from "./chunk-YL3AEJ7O.mjs";
4
4
  export {
5
5
  ListForm as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TreeView
3
- } from "./chunk-LNXRNPAK.mjs";
3
+ } from "./chunk-YL3AEJ7O.mjs";
4
4
  export {
5
5
  TreeView as default
6
6
  };
@@ -3320,15 +3320,15 @@ async function classDependencyInjector(formType) {
3320
3320
  let SubFormFactoryClass;
3321
3321
  switch (formType) {
3322
3322
  case "1" /* LIST */:
3323
- SubFormFactoryClass = (await import("./ListForm-X73EY2FM.mjs")).default;
3323
+ SubFormFactoryClass = (await import("./ListForm-TFNVONCF.mjs")).default;
3324
3324
  break;
3325
3325
  case "3" /* TREE */:
3326
- SubFormFactoryClass = (await import("./TreeView-ANMIB5JD.mjs")).default;
3326
+ SubFormFactoryClass = (await import("./TreeView-XOIPJAT7.mjs")).default;
3327
3327
  break;
3328
3328
  case "2" /* EDIT */:
3329
3329
  case "99" /* FREE_FORM */:
3330
3330
  case "4" /* REPORT */:
3331
- SubFormFactoryClass = (await import("./FormEdit-ONBAJE2O.mjs")).default;
3331
+ SubFormFactoryClass = (await import("./FormEdit-KBNOTYNX.mjs")).default;
3332
3332
  break;
3333
3333
  default:
3334
3334
  throw new Error(`Unsupported form type ${formType}`);
@@ -4670,8 +4670,33 @@ var isArrayOfDates = function(array) {
4670
4670
  };
4671
4671
  var isUndefined = (val) => val === void 0;
4672
4672
 
4673
+ // src/pageObjects/elements/EditorButton.ts
4674
+ var EditorButton = class extends AbstractElementWithParent {
4675
+ name;
4676
+ constructor(parentCssSelector, name, page) {
4677
+ super(parentCssSelector, byTestIdCssSelector(createEditorButtonTestId(name)), page);
4678
+ this.name = name;
4679
+ }
4680
+ buttonNotDisplayedError() {
4681
+ return `Editor Button ${this.name} cannot be clicked. It is not displayed or it is disabled`;
4682
+ }
4683
+ async click() {
4684
+ const button = this.getLocator();
4685
+ await button.click();
4686
+ }
4687
+ async isVisible() {
4688
+ try {
4689
+ const button = this.getLocator();
4690
+ return await button.isVisible();
4691
+ } catch {
4692
+ return false;
4693
+ }
4694
+ }
4695
+ };
4696
+
4673
4697
  // src/pageObjects/elements/Editors/SelectBoxEditor.ts
4674
4698
  var SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS = "d5-multi-select-item";
4699
+ var ELLIPSIS_BUTTON_NAME = "d5-ellipsis-button";
4675
4700
  var combinedValueXpath = (value) => `//body/div[@id="root"]/div[contains(@class, "dx-overlay-wrapper")]//${XPathHelper.getClassAndValueXpath(SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS, value)}`;
4676
4701
  var dropDownOptionClick = async (optionValue, page, delay = true) => {
4677
4702
  const locator = page.locator(`xpath=${combinedValueXpath(optionValue)}`);
@@ -4713,6 +4738,9 @@ var SelectBoxEditor = class extends AbstractDXEditorWithInput {
4713
4738
  dropDownListItem(text) {
4714
4739
  return this.dropdownList.listItem(text);
4715
4740
  }
4741
+ async ellipsisButtonClick() {
4742
+ await new EditorButton(this.getFullCssSelector(), ELLIPSIS_BUTTON_NAME, this.page).click();
4743
+ }
4716
4744
  async setSelectInputValue(value) {
4717
4745
  const inputEl = this.getInputLocator();
4718
4746
  await inputEl.click();
@@ -4801,6 +4829,9 @@ var TagBox = class extends AbstractDXEditorWithInput {
4801
4829
  dropDownListItem(text) {
4802
4830
  return this.dropdownList.listItem(text);
4803
4831
  }
4832
+ async ellipsisButtonClick() {
4833
+ await new EditorButton(this.getFullCssSelector(), ELLIPSIS_BUTTON_NAME, this.page).click();
4834
+ }
4804
4835
  async setTagBoxInputValue(values) {
4805
4836
  for (const value of values) {
4806
4837
  const input = this.getInputLocator();
@@ -5479,30 +5510,6 @@ var editorFactory = async (parentCssSelector, elementCssSelector, page) => {
5479
5510
  throw new Error("Unknown type of editor. Please write ticket to the support");
5480
5511
  };
5481
5512
 
5482
- // src/pageObjects/elements/EditorButton.ts
5483
- var EditorButton = class extends AbstractElementWithParent {
5484
- name;
5485
- constructor(parentCssSelector, name, page) {
5486
- super(parentCssSelector, byTestIdCssSelector(createEditorButtonTestId(name)), page);
5487
- this.name = name;
5488
- }
5489
- buttonNotDisplayedError() {
5490
- return `Editor Button ${this.name} cannot be clicked. It is not displayed or it is disabled`;
5491
- }
5492
- async click() {
5493
- const button = this.getLocator();
5494
- await button.click();
5495
- }
5496
- async isVisible() {
5497
- try {
5498
- const button = this.getLocator();
5499
- return await button.isVisible();
5500
- } catch {
5501
- return false;
5502
- }
5503
- }
5504
- };
5505
-
5506
5513
  // src/pageObjects/elements/EditorTitle.ts
5507
5514
  var CAPTION_TEXT_CLASS = " .caption-text";
5508
5515
  var EditorTitle = class extends AbstractElementWithParent {
@@ -5669,6 +5676,13 @@ var AbstractEditor = class extends AbstractElementWithParent {
5669
5676
  parentCssSelector: this.getFullCssSelector()
5670
5677
  }).listItem(text);
5671
5678
  }
5679
+ async ellipsisButtonClick() {
5680
+ await this.initEditor();
5681
+ if (!this.editor.ellipsisButtonClick) {
5682
+ throw new Error("The ellipsisButtonClick method is not available for this field type.");
5683
+ }
5684
+ return this.editor.ellipsisButtonClick();
5685
+ }
5672
5686
  };
5673
5687
 
5674
5688
  // src/pageObjects/elements/FormField.ts
@@ -646,8 +646,90 @@ var init_typesUtil = __esm({
646
646
  }
647
647
  });
648
648
 
649
+ // src/utils/createDataTestId.ts
650
+ function createDataTestId(formName, itemType, itemName) {
651
+ return `${formName}-${itemType}-${itemName}`;
652
+ }
653
+ function createFieldTestId(formName, itemName) {
654
+ return createDataTestId(formName, "form_field" /* FORM_FIELD */, itemName);
655
+ }
656
+ function createGroupTestId(formName, itemName) {
657
+ return createDataTestId(formName, "group" /* GROUP */, itemName);
658
+ }
659
+ function createFilterTestId(formName, itemName, layout) {
660
+ return createDataTestId(formName, "filter" /* FILTER */, itemName) + `-${layout}`;
661
+ }
662
+ function createDocFilterTestId(formName, itemName) {
663
+ return createFilterTestId(formName, itemName, "dock-panel-filter" /* DOCK_PANEL */);
664
+ }
665
+ function createHeaderFilterTestId(formName, itemName) {
666
+ return createFilterTestId(formName, itemName, "header-filter" /* HEADER_FILTER */);
667
+ }
668
+ function createLayoutFilterTestId(formName, itemName) {
669
+ return createFilterTestId(formName, itemName, "layout-filter" /* LAYOUT */);
670
+ }
671
+ function createTableId(formName) {
672
+ return `${"table" /* TABLE */}-${formName}`;
673
+ }
674
+ function createFormButtonTestId(formName, itemName) {
675
+ return createDataTestId(formName, "button" /* BUTTON */, itemName);
676
+ }
677
+ function createSubSystemTestId(itemName) {
678
+ return `${"subsystem-item" /* SUBSYSTEM_ITEM */}-${itemName}`;
679
+ }
680
+ function createEditorButtonTestId(itemName) {
681
+ return `${"editor-button" /* EDITOR_BUTTON */}-${itemName}`;
682
+ }
683
+ function createLabelFieldTestId(formName, itemName) {
684
+ return `${"label" /* LABEL */}-${createFieldTestId(formName, itemName)}`;
685
+ }
686
+ function createLabelDocFilterTestId(formName, itemName) {
687
+ return `${"label" /* LABEL */}-${createDocFilterTestId(formName, itemName)}`;
688
+ }
689
+ function createLabelLayoutFilterTestId(formName, itemName) {
690
+ return `${"label" /* LABEL */}-${createLayoutFilterTestId(formName, itemName)}`;
691
+ }
692
+ var init_createDataTestId = __esm({
693
+ "src/utils/createDataTestId.ts"() {
694
+ "use strict";
695
+ }
696
+ });
697
+
698
+ // src/pageObjects/elements/EditorButton.ts
699
+ var EditorButton;
700
+ var init_EditorButton = __esm({
701
+ "src/pageObjects/elements/EditorButton.ts"() {
702
+ "use strict";
703
+ init_locators();
704
+ init_createDataTestId();
705
+ init_AbstractElementWithParent();
706
+ EditorButton = class extends AbstractElementWithParent {
707
+ name;
708
+ constructor(parentCssSelector, name, page) {
709
+ super(parentCssSelector, byTestIdCssSelector(createEditorButtonTestId(name)), page);
710
+ this.name = name;
711
+ }
712
+ buttonNotDisplayedError() {
713
+ return `Editor Button ${this.name} cannot be clicked. It is not displayed or it is disabled`;
714
+ }
715
+ async click() {
716
+ const button = this.getLocator();
717
+ await button.click();
718
+ }
719
+ async isVisible() {
720
+ try {
721
+ const button = this.getLocator();
722
+ return await button.isVisible();
723
+ } catch {
724
+ return false;
725
+ }
726
+ }
727
+ };
728
+ }
729
+ });
730
+
649
731
  // src/pageObjects/elements/Editors/SelectBoxEditor.ts
650
- var SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS, combinedValueXpath, dropDownOptionClick, SelectBoxEditor;
732
+ var SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS, ELLIPSIS_BUTTON_NAME, combinedValueXpath, dropDownOptionClick, SelectBoxEditor;
651
733
  var init_SelectBoxEditor = __esm({
652
734
  "src/pageObjects/elements/Editors/SelectBoxEditor.ts"() {
653
735
  "use strict";
@@ -657,7 +739,9 @@ var init_SelectBoxEditor = __esm({
657
739
  init_src();
658
740
  init_typesUtil();
659
741
  init_DropDownList();
742
+ init_EditorButton();
660
743
  SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS = "d5-multi-select-item";
744
+ ELLIPSIS_BUTTON_NAME = "d5-ellipsis-button";
661
745
  combinedValueXpath = (value) => `//body/div[@id="root"]/div[contains(@class, "dx-overlay-wrapper")]//${XPathHelper.getClassAndValueXpath(SELECT_BOX_OPTION_TEXT_CONTAINER_CLASS, value)}`;
662
746
  dropDownOptionClick = async (optionValue, page, delay = true) => {
663
747
  const locator = page.locator(`xpath=${combinedValueXpath(optionValue)}`);
@@ -699,6 +783,9 @@ var init_SelectBoxEditor = __esm({
699
783
  dropDownListItem(text) {
700
784
  return this.dropdownList.listItem(text);
701
785
  }
786
+ async ellipsisButtonClick() {
787
+ await new EditorButton(this.getFullCssSelector(), ELLIPSIS_BUTTON_NAME, this.page).click();
788
+ }
702
789
  async setSelectInputValue(value) {
703
790
  const inputEl = this.getInputLocator();
704
791
  await inputEl.click();
@@ -778,6 +865,7 @@ var init_TagBox = __esm({
778
865
  init_SelectBoxEditor();
779
866
  init_wait();
780
867
  init_DropDownList();
868
+ init_EditorButton();
781
869
  TAGS_SELECTOR = ".dx-tag .tag-text";
782
870
  DX_TAG_CONTAINER = "dx-tag-container";
783
871
  DX_TEXTEDITOR_EMPTY2 = "dx-texteditor-empty";
@@ -807,6 +895,9 @@ var init_TagBox = __esm({
807
895
  dropDownListItem(text) {
808
896
  return this.dropdownList.listItem(text);
809
897
  }
898
+ async ellipsisButtonClick() {
899
+ await new EditorButton(this.getFullCssSelector(), ELLIPSIS_BUTTON_NAME, this.page).click();
900
+ }
810
901
  async setTagBoxInputValue(values) {
811
902
  for (const value of values) {
812
903
  const input = this.getInputLocator();
@@ -1640,55 +1731,6 @@ var init_SubsystemItem = __esm({
1640
1731
  }
1641
1732
  });
1642
1733
 
1643
- // src/utils/createDataTestId.ts
1644
- function createDataTestId(formName, itemType, itemName) {
1645
- return `${formName}-${itemType}-${itemName}`;
1646
- }
1647
- function createFieldTestId(formName, itemName) {
1648
- return createDataTestId(formName, "form_field" /* FORM_FIELD */, itemName);
1649
- }
1650
- function createGroupTestId(formName, itemName) {
1651
- return createDataTestId(formName, "group" /* GROUP */, itemName);
1652
- }
1653
- function createFilterTestId(formName, itemName, layout) {
1654
- return createDataTestId(formName, "filter" /* FILTER */, itemName) + `-${layout}`;
1655
- }
1656
- function createDocFilterTestId(formName, itemName) {
1657
- return createFilterTestId(formName, itemName, "dock-panel-filter" /* DOCK_PANEL */);
1658
- }
1659
- function createHeaderFilterTestId(formName, itemName) {
1660
- return createFilterTestId(formName, itemName, "header-filter" /* HEADER_FILTER */);
1661
- }
1662
- function createLayoutFilterTestId(formName, itemName) {
1663
- return createFilterTestId(formName, itemName, "layout-filter" /* LAYOUT */);
1664
- }
1665
- function createTableId(formName) {
1666
- return `${"table" /* TABLE */}-${formName}`;
1667
- }
1668
- function createFormButtonTestId(formName, itemName) {
1669
- return createDataTestId(formName, "button" /* BUTTON */, itemName);
1670
- }
1671
- function createSubSystemTestId(itemName) {
1672
- return `${"subsystem-item" /* SUBSYSTEM_ITEM */}-${itemName}`;
1673
- }
1674
- function createEditorButtonTestId(itemName) {
1675
- return `${"editor-button" /* EDITOR_BUTTON */}-${itemName}`;
1676
- }
1677
- function createLabelFieldTestId(formName, itemName) {
1678
- return `${"label" /* LABEL */}-${createFieldTestId(formName, itemName)}`;
1679
- }
1680
- function createLabelDocFilterTestId(formName, itemName) {
1681
- return `${"label" /* LABEL */}-${createDocFilterTestId(formName, itemName)}`;
1682
- }
1683
- function createLabelLayoutFilterTestId(formName, itemName) {
1684
- return `${"label" /* LABEL */}-${createLayoutFilterTestId(formName, itemName)}`;
1685
- }
1686
- var init_createDataTestId = __esm({
1687
- "src/utils/createDataTestId.ts"() {
1688
- "use strict";
1689
- }
1690
- });
1691
-
1692
1734
  // src/pageObjects/elements/SubsystemsPanel/SubsystemsPanel.ts
1693
1735
  var SEARCH_ITEM_SELECTOR, BACK_BUTTON_SELECTOR, SEARCH_INPUT_SELECTOR, byTitleCssSelector, SubsystemsPanel;
1694
1736
  var init_SubsystemsPanel = __esm({
@@ -2508,39 +2550,6 @@ var init_Column = __esm({
2508
2550
  }
2509
2551
  });
2510
2552
 
2511
- // src/pageObjects/elements/EditorButton.ts
2512
- var EditorButton;
2513
- var init_EditorButton = __esm({
2514
- "src/pageObjects/elements/EditorButton.ts"() {
2515
- "use strict";
2516
- init_locators();
2517
- init_createDataTestId();
2518
- init_AbstractElementWithParent();
2519
- EditorButton = class extends AbstractElementWithParent {
2520
- name;
2521
- constructor(parentCssSelector, name, page) {
2522
- super(parentCssSelector, byTestIdCssSelector(createEditorButtonTestId(name)), page);
2523
- this.name = name;
2524
- }
2525
- buttonNotDisplayedError() {
2526
- return `Editor Button ${this.name} cannot be clicked. It is not displayed or it is disabled`;
2527
- }
2528
- async click() {
2529
- const button = this.getLocator();
2530
- await button.click();
2531
- }
2532
- async isVisible() {
2533
- try {
2534
- const button = this.getLocator();
2535
- return await button.isVisible();
2536
- } catch {
2537
- return false;
2538
- }
2539
- }
2540
- };
2541
- }
2542
- });
2543
-
2544
2553
  // src/pageObjects/elements/EditorTitle.ts
2545
2554
  var CAPTION_TEXT_CLASS, EditorTitle;
2546
2555
  var init_EditorTitle = __esm({
@@ -2722,6 +2731,13 @@ var init_AbstractEditor2 = __esm({
2722
2731
  parentCssSelector: this.getFullCssSelector()
2723
2732
  }).listItem(text);
2724
2733
  }
2734
+ async ellipsisButtonClick() {
2735
+ await this.initEditor();
2736
+ if (!this.editor.ellipsisButtonClick) {
2737
+ throw new Error("The ellipsisButtonClick method is not available for this field type.");
2738
+ }
2739
+ return this.editor.ellipsisButtonClick();
2740
+ }
2725
2741
  };
2726
2742
  }
2727
2743
  });
@@ -102,6 +102,7 @@ interface Editor {
102
102
  dropDownClose?(): Promise<void>;
103
103
  dropDownList?(): Promise<ListItem[]>;
104
104
  dropDownListItem?(text: string): ListItem;
105
+ ellipsisButtonClick?(): Promise<void>;
105
106
  isReadonly?(): Promise<boolean>;
106
107
  isDisabled?(): Promise<boolean>;
107
108
  download?(): Promise<string>;
@@ -478,6 +479,7 @@ declare class AbstractEditor extends AbstractElementWithParent implements Editor
478
479
  dropDownClose(): Promise<void>;
479
480
  dropDownList(): Promise<ListItem[]>;
480
481
  dropDownListItem(text: string): ListItem;
482
+ ellipsisButtonClick(): Promise<void>;
481
483
  }
482
484
 
483
485
  declare class FormField extends AbstractEditor {
@@ -102,6 +102,7 @@ interface Editor {
102
102
  dropDownClose?(): Promise<void>;
103
103
  dropDownList?(): Promise<ListItem[]>;
104
104
  dropDownListItem?(text: string): ListItem;
105
+ ellipsisButtonClick?(): Promise<void>;
105
106
  isReadonly?(): Promise<boolean>;
106
107
  isDisabled?(): Promise<boolean>;
107
108
  download?(): Promise<string>;
@@ -478,6 +479,7 @@ declare class AbstractEditor extends AbstractElementWithParent implements Editor
478
479
  dropDownClose(): Promise<void>;
479
480
  dropDownList(): Promise<ListItem[]>;
480
481
  dropDownListItem(text: string): ListItem;
482
+ ellipsisButtonClick(): Promise<void>;
481
483
  }
482
484
 
483
485
  declare class FormField extends AbstractEditor {
@@ -25,7 +25,7 @@ import {
25
25
  readonlyLocator,
26
26
  wait,
27
27
  waitElementIsVisible_default
28
- } from "./chunk-LNXRNPAK.mjs";
28
+ } from "./chunk-YL3AEJ7O.mjs";
29
29
  export {
30
30
  AbstractPage,
31
31
  ApiRequest,
@@ -25,7 +25,7 @@ import {
25
25
  readonlyLocator,
26
26
  wait,
27
27
  waitElementIsVisible_default
28
- } from "./chunk-LNXRNPAK.mjs";
28
+ } from "./chunk-YL3AEJ7O.mjs";
29
29
  export {
30
30
  AbstractPage,
31
31
  ApiRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d5-testing-library",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.17",
4
4
  "description": "e2e testing D5 projects",
5
5
  "main": "dist/cjs/d5-testing-library.cjs",
6
6
  "module": "dist/d5-testing-library.legacy-esm.js",