@linzjs/step-ag-grid 7.16.0 → 7.16.2

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/README.md CHANGED
@@ -147,6 +147,7 @@ The following testing calls can be imported from step-ag-grid:
147
147
  - selectCell
148
148
  - editCell
149
149
  - findOpenMenu
150
+ - validateMenuOptions
150
151
  - queryMenuOption
151
152
  - findMenuOption
152
153
  - clickMenuOption
@@ -154,6 +155,9 @@ The following testing calls can be imported from step-ag-grid:
154
155
  - getMultiSelectOptions
155
156
  - findMultiSelectOption
156
157
  - clickMultiSelectOption
158
+ - typeOnlyInput
159
+ - typeInputByLabel
160
+ - typeInputByPlaceholder
157
161
  - typeOtherInput
158
162
  - typeOtherTextArea
159
163
  - closeMenu
@@ -18,7 +18,9 @@ export declare const getMultiSelectOptions: () => Promise<{
18
18
  }[]>;
19
19
  export declare const findMultiSelectOption: (value: string) => Promise<HTMLElement>;
20
20
  export declare const clickMultiSelectOption: (value: string) => Promise<void>;
21
- export declare const typeInput: (value: string) => Promise<void>;
21
+ export declare const typeOnlyInput: (value: string) => Promise<void>;
22
+ export declare const typeInputByLabel: (value: string, labelText: string) => Promise<void>;
23
+ export declare const typeInputByPlaceholder: (value: string, placeholder: string) => Promise<void>;
22
24
  export declare const typeOtherInput: (value: string) => Promise<void>;
23
25
  export declare const typeOtherTextArea: (value: string) => Promise<void>;
24
26
  export declare const closeMenu: () => void;
@@ -24752,52 +24752,67 @@ var clickMultiSelectOption = function (value) { return __awaiter(void 0, void 0,
24752
24752
  }
24753
24753
  });
24754
24754
  }); };
24755
- var typeInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
24756
- var openMenu, input;
24755
+ var typeInput = function (value, filter) { return __awaiter(void 0, void 0, void 0, function () {
24757
24756
  return __generator(this, function (_a) {
24758
24757
  switch (_a.label) {
24759
- case 0: return [4 /*yield*/, findOpenMenu()];
24758
+ case 0: return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
24759
+ var openMenu, input;
24760
+ return __generator(this, function (_a) {
24761
+ switch (_a.label) {
24762
+ case 0: return [4 /*yield*/, findOpenMenu()];
24763
+ case 1:
24764
+ openMenu = _a.sent();
24765
+ return [4 /*yield*/, findQuick(filter, openMenu)];
24766
+ case 2:
24767
+ input = _a.sent();
24768
+ userEvent.clear(input);
24769
+ userEvent.type(input, value);
24770
+ return [2 /*return*/];
24771
+ }
24772
+ });
24773
+ }); })];
24760
24774
  case 1:
24761
- openMenu = _a.sent();
24762
- return [4 /*yield*/, findQuick({ child: { tagName: "input[type='text']" } }, openMenu)];
24763
- case 2:
24764
- input = _a.sent();
24765
- userEvent.clear(input);
24766
- userEvent.type(input, value);
24775
+ _a.sent();
24767
24776
  return [2 /*return*/];
24768
24777
  }
24769
24778
  });
24770
24779
  }); };
24771
- var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
24772
- var openMenu, otherInput;
24780
+ var typeOnlyInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
24773
24781
  return __generator(this, function (_a) {
24774
- switch (_a.label) {
24775
- case 0: return [4 /*yield*/, findOpenMenu()];
24776
- case 1:
24777
- openMenu = _a.sent();
24778
- return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu)];
24779
- case 2:
24780
- otherInput = _a.sent();
24781
- userEvent.clear(otherInput);
24782
- userEvent.type(otherInput, value);
24783
- return [2 /*return*/];
24782
+ typeInput(value, { child: { tagName: "input[type='text']" } });
24783
+ return [2 /*return*/];
24784
+ });
24785
+ }); };
24786
+ var typeInputByLabel = function (value, labelText) { return __awaiter(void 0, void 0, void 0, function () {
24787
+ var labels;
24788
+ return __generator(this, function (_a) {
24789
+ labels = getAllQuick({ child: { tagName: "label" } }).filter(function (l) { return l.textContent == labelText; });
24790
+ if (labels.length == 0) {
24791
+ throw Error("Label not found for text: ".concat(labelText));
24792
+ }
24793
+ if (labels.length > 1) {
24794
+ throw Error("Multiple labels found for text: ".concat(labelText));
24784
24795
  }
24796
+ typeInput(value, { child: { tagName: "input[id='".concat(labels[0].getAttribute("for"), "']") } });
24797
+ return [2 /*return*/];
24798
+ });
24799
+ }); };
24800
+ var typeInputByPlaceholder = function (value, placeholder) { return __awaiter(void 0, void 0, void 0, function () {
24801
+ return __generator(this, function (_a) {
24802
+ typeInput(value, { child: { tagName: "input[placeholder='".concat(placeholder, "']") } });
24803
+ return [2 /*return*/];
24804
+ });
24805
+ }); };
24806
+ var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
24807
+ return __generator(this, function (_a) {
24808
+ typeInput(value, { classes: ".subComponent", child: { tagName: "input[type='text']" } });
24809
+ return [2 /*return*/];
24785
24810
  });
24786
24811
  }); };
24787
24812
  var typeOtherTextArea = function (value) { return __awaiter(void 0, void 0, void 0, function () {
24788
- var openMenu, otherTextArea;
24789
24813
  return __generator(this, function (_a) {
24790
- switch (_a.label) {
24791
- case 0: return [4 /*yield*/, findOpenMenu()];
24792
- case 1:
24793
- openMenu = _a.sent();
24794
- return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "textarea" } }, openMenu)];
24795
- case 2:
24796
- otherTextArea = _a.sent();
24797
- userEvent.clear(otherTextArea);
24798
- userEvent.type(otherTextArea, value);
24799
- return [2 /*return*/];
24800
- }
24814
+ typeInput(value, { classes: ".subComponent", child: { tagName: "textarea" } });
24815
+ return [2 /*return*/];
24801
24816
  });
24802
24817
  }); };
24803
24818
  var closeMenu = function () {
@@ -24828,5 +24843,5 @@ var clickActionButton = function (text, container) { return __awaiter(void 0, vo
24828
24843
  });
24829
24844
  }); };
24830
24845
 
24831
- export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isFloat, isNotEmpty, openAndClickMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
24846
+ export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isFloat, isNotEmpty, openAndClickMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
24832
24847
  //# sourceMappingURL=step-ag-grid.esm.js.map