@dynatrace/strato-components-testing 1.17.0 → 3.0.1

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.
Files changed (117) hide show
  1. package/esm/jest/index.js +102 -3
  2. package/esm/jest/index.js.map +2 -2
  3. package/esm/jest/mocks/create-mock-element.js +81 -0
  4. package/esm/jest/mocks/create-mock-element.js.map +7 -0
  5. package/esm/jest/mocks/create-range-mock.js +28 -0
  6. package/esm/jest/mocks/create-range-mock.js.map +7 -0
  7. package/esm/jest/mocks/crypto-mock.js +20 -0
  8. package/esm/jest/mocks/crypto-mock.js.map +7 -0
  9. package/esm/jest/mocks/dom-rect-mock.js.map +2 -2
  10. package/esm/jest/mocks/element-from-point-mock.js +12 -0
  11. package/esm/jest/mocks/element-from-point-mock.js.map +7 -0
  12. package/esm/jest/mocks/fetch-mock.js +20 -0
  13. package/esm/jest/mocks/fetch-mock.js.map +7 -0
  14. package/esm/jest/mocks/framer-motion-mock.js +59 -0
  15. package/esm/jest/mocks/framer-motion-mock.js.map +7 -0
  16. package/esm/jest/mocks/intersection-observer-mock.js +40 -0
  17. package/esm/jest/mocks/intersection-observer-mock.js.map +7 -0
  18. package/esm/jest/mocks/match-media-mock.js +27 -0
  19. package/esm/jest/mocks/match-media-mock.js.map +7 -0
  20. package/esm/jest/mocks/offset-height-mock.js +21 -0
  21. package/esm/jest/mocks/offset-height-mock.js.map +7 -0
  22. package/esm/jest/mocks/offset-width-mock.js +21 -0
  23. package/esm/jest/mocks/offset-width-mock.js.map +7 -0
  24. package/esm/jest/mocks/pointer-event-mock.js +24 -0
  25. package/esm/jest/mocks/pointer-event-mock.js.map +7 -0
  26. package/esm/jest/mocks/screen-size-mock.js +16 -0
  27. package/esm/jest/mocks/screen-size-mock.js.map +7 -0
  28. package/esm/jest/mocks/scroll-into-view-mock.js +16 -0
  29. package/esm/jest/mocks/scroll-into-view-mock.js.map +7 -0
  30. package/esm/jest/mocks/streamdown.mock.js +8 -0
  31. package/esm/jest/mocks/streamdown.mock.js.map +7 -0
  32. package/esm/jest/mocks/table-virtualization-mock.js +87 -0
  33. package/esm/jest/mocks/table-virtualization-mock.js.map +7 -0
  34. package/esm/jest/mocks/virtualization-mock.js +155 -0
  35. package/esm/jest/mocks/virtualization-mock.js.map +7 -0
  36. package/esm/jest/preset/jest-preset.js +2 -1
  37. package/esm/jest/preset/jest-preset.js.map +2 -2
  38. package/esm/jest/setup/index.js +51 -0
  39. package/esm/jest/setup/index.js.map +2 -2
  40. package/esm/jest/testing-helpers/filters/filter-field.js +424 -0
  41. package/esm/jest/testing-helpers/filters/filter-field.js.map +7 -0
  42. package/esm/jest/testing-helpers/forms/base-input.js +32 -0
  43. package/esm/jest/testing-helpers/forms/base-input.js.map +7 -0
  44. package/esm/jest/testing-helpers/forms/password-input.js +29 -0
  45. package/esm/jest/testing-helpers/forms/password-input.js.map +7 -0
  46. package/esm/jest/testing-helpers/forms/search-input.js +27 -0
  47. package/esm/jest/testing-helpers/forms/search-input.js.map +7 -0
  48. package/esm/jest/testing-helpers/forms/select.js +131 -0
  49. package/esm/jest/testing-helpers/forms/select.js.map +7 -0
  50. package/esm/jest/testing-helpers/forms/text-input.js +24 -0
  51. package/esm/jest/testing-helpers/forms/text-input.js.map +7 -0
  52. package/esm/jest/testing-helpers/tables/datatable.js +794 -0
  53. package/esm/jest/testing-helpers/tables/datatable.js.map +7 -0
  54. package/esm/jest/testing-helpers/utils/isFakeTimersEnabled.js +9 -0
  55. package/esm/jest/testing-helpers/utils/isFakeTimersEnabled.js.map +7 -0
  56. package/esm/jest/testing-helpers/utils/setup-user-event.js +15 -0
  57. package/esm/jest/testing-helpers/utils/setup-user-event.js.map +7 -0
  58. package/jest/index.d.ts +22 -1
  59. package/jest/index.js +54 -3
  60. package/jest/mocks/create-mock-element.d.ts +15 -0
  61. package/jest/mocks/create-mock-element.js +99 -0
  62. package/jest/mocks/create-range-mock.d.ts +11 -0
  63. package/jest/mocks/create-range-mock.js +46 -0
  64. package/jest/mocks/crypto-mock.d.ts +12 -0
  65. package/jest/mocks/crypto-mock.js +48 -0
  66. package/jest/mocks/dom-rect-mock.d.ts +1 -0
  67. package/jest/mocks/element-from-point-mock.d.ts +11 -0
  68. package/jest/{setup.js → mocks/element-from-point-mock.js} +10 -16
  69. package/jest/mocks/fetch-mock.d.ts +10 -0
  70. package/jest/mocks/fetch-mock.js +38 -0
  71. package/jest/mocks/framer-motion-mock.d.ts +18 -0
  72. package/jest/mocks/framer-motion-mock.js +75 -0
  73. package/jest/mocks/intersection-observer-mock.d.ts +11 -0
  74. package/jest/mocks/intersection-observer-mock.js +58 -0
  75. package/jest/mocks/match-media-mock.d.ts +11 -0
  76. package/jest/mocks/match-media-mock.js +45 -0
  77. package/jest/mocks/offset-height-mock.d.ts +10 -0
  78. package/jest/mocks/offset-height-mock.js +39 -0
  79. package/jest/mocks/offset-width-mock.d.ts +10 -0
  80. package/jest/mocks/offset-width-mock.js +39 -0
  81. package/jest/mocks/pointer-event-mock.d.ts +10 -0
  82. package/jest/mocks/pointer-event-mock.js +42 -0
  83. package/jest/mocks/screen-size-mock.d.ts +10 -0
  84. package/jest/mocks/screen-size-mock.js +34 -0
  85. package/jest/mocks/scroll-into-view-mock.d.ts +10 -0
  86. package/jest/mocks/scroll-into-view-mock.js +34 -0
  87. package/jest/mocks/streamdown.mock.d.ts +2 -0
  88. package/jest/mocks/streamdown.mock.js +26 -0
  89. package/jest/mocks/table-virtualization-mock.d.ts +15 -0
  90. package/jest/mocks/table-virtualization-mock.js +102 -0
  91. package/jest/mocks/virtualization-mock.d.ts +9 -0
  92. package/jest/mocks/virtualization-mock.js +170 -0
  93. package/jest/preset/jest-preset.d.ts +2 -3
  94. package/jest/preset/jest-preset.js +2 -1
  95. package/jest/setup/index.js +27 -0
  96. package/jest/testing-helpers/filters/filter-field.d.ts +109 -0
  97. package/jest/testing-helpers/filters/filter-field.js +436 -0
  98. package/jest/testing-helpers/forms/base-input.d.ts +17 -0
  99. package/jest/testing-helpers/forms/base-input.js +50 -0
  100. package/jest/testing-helpers/forms/password-input.d.ts +16 -0
  101. package/jest/testing-helpers/forms/password-input.js +47 -0
  102. package/jest/testing-helpers/forms/search-input.d.ts +20 -0
  103. package/jest/testing-helpers/forms/search-input.js +45 -0
  104. package/jest/testing-helpers/forms/select.d.ts +65 -0
  105. package/jest/testing-helpers/forms/select.js +159 -0
  106. package/jest/testing-helpers/forms/text-input.d.ts +19 -0
  107. package/jest/testing-helpers/forms/text-input.js +42 -0
  108. package/jest/testing-helpers/tables/datatable.d.ts +239 -0
  109. package/jest/testing-helpers/tables/datatable.js +812 -0
  110. package/jest/testing-helpers/utils/isFakeTimersEnabled.d.ts +5 -0
  111. package/jest/testing-helpers/utils/isFakeTimersEnabled.js +27 -0
  112. package/jest/testing-helpers/utils/setup-user-event.d.ts +6 -0
  113. package/jest/testing-helpers/utils/setup-user-event.js +43 -0
  114. package/package.json +11 -3
  115. package/esm/jest/setup.js +0 -24
  116. package/esm/jest/setup.js.map +0 -7
  117. package/jest/setup.d.ts +0 -14
@@ -0,0 +1,159 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var select_exports = {};
29
+ __export(select_exports, {
30
+ SelectTestingHelper: () => SelectTestingHelper,
31
+ getSelectTestingHelper: () => getSelectTestingHelper
32
+ });
33
+ module.exports = __toCommonJS(select_exports);
34
+ var import_react = require("@testing-library/react");
35
+ var import_user_event = __toESM(require("@testing-library/user-event"));
36
+ class SelectTestingHelper {
37
+ constructor(dataTestId) {
38
+ this.dataTestId = dataTestId;
39
+ }
40
+ /**
41
+ * Gets the root element of the select.
42
+ */
43
+ get element() {
44
+ return import_react.screen.getByTestId(this.dataTestId);
45
+ }
46
+ /**
47
+ * Gets the trigger element of the select.
48
+ */
49
+ get trigger() {
50
+ const triggerElement = this.element.querySelector('div[type="button"]');
51
+ if (triggerElement) {
52
+ return triggerElement;
53
+ }
54
+ throw new Error("Trigger element for the select was not found.");
55
+ }
56
+ /**
57
+ * Gets the text value of the trigger display value of the select.
58
+ */
59
+ get displayValue() {
60
+ const displayValue = this.trigger.textContent;
61
+ if (displayValue) {
62
+ return displayValue;
63
+ }
64
+ throw new Error("Could not get display value.");
65
+ }
66
+ /**
67
+ * Gets the overlay (content) of the select.
68
+ */
69
+ get overlay() {
70
+ const selectInputAriaControls = (0, import_react.within)(this.trigger).getByRole("combobox", { hidden: true }).getAttribute("aria-controls");
71
+ const listboxElement = document.querySelector(
72
+ `[role="listbox"][id="${selectInputAriaControls}"]`
73
+ );
74
+ if (listboxElement) {
75
+ return listboxElement.parentElement;
76
+ }
77
+ throw new Error("Could not find the overlay element for the select.");
78
+ }
79
+ /**
80
+ * Gets the text value of the select filter in the overlay.
81
+ */
82
+ get filterValue() {
83
+ const filter = (0, import_react.within)(this.overlay).getByPlaceholderText(
84
+ "Search"
85
+ );
86
+ return filter.value;
87
+ }
88
+ /**
89
+ * Gets the currently selected option(s).
90
+ */
91
+ get selectedOptions() {
92
+ const selectedOptions = (0, import_react.within)(
93
+ this.element
94
+ ).getAllByRole("option", { hidden: true });
95
+ return selectedOptions.map((option) => option.value);
96
+ }
97
+ /**
98
+ * Gets the open state of the select overlay.
99
+ */
100
+ get openState() {
101
+ return (0, import_react.within)(this.trigger).getByRole("combobox", { hidden: true }).getAttribute("aria-expanded") === "true";
102
+ }
103
+ /**
104
+ * Gets the option with the corresponding label.
105
+ */
106
+ getOption(label) {
107
+ const option = (0, import_react.within)(this.overlay).getByRole("option", {
108
+ name: label
109
+ });
110
+ return option;
111
+ }
112
+ /**
113
+ * Selects the option with the corresponding label.
114
+ */
115
+ async selectOption(label) {
116
+ await this.open();
117
+ const option = (0, import_react.within)(this.overlay).getByRole("option", {
118
+ name: label
119
+ });
120
+ await import_user_event.default.click(option);
121
+ }
122
+ /**
123
+ * Opens the select overlay.
124
+ */
125
+ async open() {
126
+ if (!this.openState) {
127
+ await import_user_event.default.click(this.trigger);
128
+ }
129
+ }
130
+ /**
131
+ * Closes the select overlay.
132
+ */
133
+ async close() {
134
+ if (this.openState) {
135
+ await import_user_event.default.click(this.trigger);
136
+ }
137
+ }
138
+ /**
139
+ * Types in the filter of the select.
140
+ */
141
+ async typeInFilter(text) {
142
+ await this.open();
143
+ const user = import_user_event.default.setup();
144
+ const filter = (0, import_react.within)(this.overlay).getByPlaceholderText("Search");
145
+ await user.click(filter);
146
+ await user.keyboard(text);
147
+ }
148
+ /**
149
+ * Clears the filter / search of the select overlay.
150
+ */
151
+ async clearFilter() {
152
+ await this.open();
153
+ const filter = (0, import_react.within)(this.overlay).getByPlaceholderText("Search");
154
+ await import_user_event.default.clear(filter);
155
+ }
156
+ }
157
+ function getSelectTestingHelper(dataTestId) {
158
+ return new SelectTestingHelper(dataTestId);
159
+ }
@@ -0,0 +1,19 @@
1
+ import { BaseInputHelper } from './base-input.js';
2
+ /**
3
+ * Helper class for interacting with the text input
4
+ * @public
5
+ */
6
+ export declare class TextInputHelper extends BaseInputHelper {
7
+ /**
8
+ * Helper that will let you call a specific prefix or suffix button
9
+ * within the TextInput component.
10
+ */
11
+ clickButton(name: string): Promise<void>;
12
+ }
13
+ /**
14
+ * Helper function that returns the text input element with its testing utilities.
15
+ * @public
16
+ */
17
+ export declare function getTextInputHelper(
18
+ /** The accessible test id used to locate the input wrapper. */
19
+ dataTestId: string): TextInputHelper;
@@ -0,0 +1,42 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var text_input_exports = {};
19
+ __export(text_input_exports, {
20
+ TextInputHelper: () => TextInputHelper,
21
+ getTextInputHelper: () => getTextInputHelper
22
+ });
23
+ module.exports = __toCommonJS(text_input_exports);
24
+ var import_react = require("@testing-library/react");
25
+ var import_base_input = require("./base-input.js");
26
+ var import_setup_user_event = require("../utils/setup-user-event.js");
27
+ class TextInputHelper extends import_base_input.BaseInputHelper {
28
+ /**
29
+ * Helper that will let you call a specific prefix or suffix button
30
+ * within the TextInput component.
31
+ */
32
+ async clickButton(name) {
33
+ const button = (0, import_react.within)(this.inputWrapper).getByRole("button", {
34
+ hidden: true,
35
+ name
36
+ });
37
+ await (0, import_setup_user_event.setupUserEvent)().click(button);
38
+ }
39
+ }
40
+ function getTextInputHelper(dataTestId) {
41
+ return new TextInputHelper(dataTestId);
42
+ }
@@ -0,0 +1,239 @@
1
+ /** @public */
2
+ export declare class DataTableSubRowsHelper {
3
+ private readonly rootHelper;
4
+ constructor(rootHelper: DataTableHelper);
5
+ private getSubRowButton;
6
+ private get getToggleAllSubRowsButton();
7
+ /**
8
+ * Return the expanded state of the passed subrow id.
9
+ */
10
+ getSubRowStateById(rowId: string): Promise<boolean>;
11
+ /**
12
+ * Expands the given row identified by the passed rowId if it not yet expanded.
13
+ */
14
+ expandRowById(rowId: string): Promise<void>;
15
+ /**
16
+ * Collapses the given row identified by the passed rowId if not yet collapsed.
17
+ */
18
+ collapseRowById(rowId: string): Promise<void>;
19
+ /**
20
+ * Toggles the expanded state of a given row identified by the passed rowId if not yet collapsed.
21
+ */
22
+ toggleSubRowById(rowId: string): Promise<void>;
23
+ /**
24
+ * Expands/Collapses all sub rows in the table.
25
+ */
26
+ toggleAllSubRows(): Promise<void>;
27
+ }
28
+ /** @public */
29
+ export declare class DataTableRowSelectionHelper {
30
+ private readonly rootHelper;
31
+ constructor(rootHelper: DataTableHelper);
32
+ private getCheckboxById;
33
+ private getCheckboxSelectAll;
34
+ /**
35
+ * Ticks the selection checkbox for a row if it is not yet selected.
36
+ */
37
+ selectRowById(id: string): Promise<void>;
38
+ /**
39
+ * Unselects the selection checkbox for a row if it is not selected.
40
+ */
41
+ deselectRowById(id: string): Promise<void>;
42
+ /**
43
+ * Toggles selection on the row.
44
+ */
45
+ toggleSelectionRowById(id: string): Promise<void>;
46
+ /**
47
+ * Toggles selection on the row with the Shift key pressed (batch selection).
48
+ */
49
+ shiftToggleSelectionRowById(id: string): Promise<void>;
50
+ /**
51
+ * Returns the selection state for the row with the given ID.
52
+ */
53
+ getSelectionStateById(id: string): Promise<boolean | 'indeterminate'>;
54
+ /**
55
+ * Returns a selection state for the currently shown checkboxes (current page).
56
+ * Hint: Elements might be virtualized or not shown on this page.
57
+ */
58
+ getSelectionState(): Promise<Record<string, boolean | 'indeterminate'>>;
59
+ isSelectAllDisabled(): Promise<boolean>;
60
+ getSelectAllState(): Promise<boolean | 'indeterminate'>;
61
+ toggleSelectAll(): Promise<void>;
62
+ }
63
+ /** @public */
64
+ export declare class DataTableUserActionHelper {
65
+ private readonly dataTestId;
66
+ /**
67
+ * Gets the root element of the DataTable
68
+ */
69
+ get element(): HTMLDivElement;
70
+ constructor(dataTestId: string);
71
+ /**
72
+ * Lets you call a HeaderAction registered on the DataTable
73
+ */
74
+ activateHeaderAction(
75
+ /** Provide the rendered header string or a RegExp that matches the header cell. */
76
+ headerName: string | RegExp,
77
+ /** Provide the rendered actionName string or a RegExp that matches the option. */
78
+ actionName: string | RegExp): Promise<void>;
79
+ /**
80
+ * Lets you call a CellAction registered on the DataTable
81
+ */
82
+ activateCellAction(
83
+ /** Provide the rendered header id string or a RegExp that matches the header cell. */
84
+ headerName: string | RegExp,
85
+ /** Zero based index for the row. */
86
+ row: number,
87
+ /** Provide the rendered actionName string or a RegExp that matches the option. */
88
+ actionName: string | RegExp): Promise<void>;
89
+ /**
90
+ * Lets you call a RowAction registered on the DataTable
91
+ */
92
+ activateRowAction(
93
+ /** Zero based index for the row. */
94
+ row: number,
95
+ /** Provide the rendered actionName string or a RegExp that matches the option. */
96
+ actionName: string | RegExp): Promise<void>;
97
+ }
98
+ /** @public */
99
+ export declare class DataTablePaginationHelper {
100
+ private readonly dataTestId;
101
+ /**
102
+ * Gets the root element of the DataTable
103
+ */
104
+ private get element();
105
+ private get paginationElement();
106
+ private get pageSizeSelect();
107
+ private get pageIndexSelect();
108
+ constructor(dataTestId: string);
109
+ /**
110
+ * Allows you to set the pageSize via the select in the DataTable Pagination.
111
+ * @param pageSize - Target pageSize the pagination should be set to.
112
+ */
113
+ setPageSizeTo(pageSize: number): Promise<void>;
114
+ /**
115
+ * Allows you to set the pageIndex via the select in the DataTable Pagination.
116
+ * @param pageIndex - pageIndex you want to navigate to. 0 based value
117
+ */
118
+ setPageIndex(pageIndex: number): Promise<void>;
119
+ /**
120
+ * Allows you to go to the next page using the "Next page" button.
121
+ */
122
+ goToNextPage(): Promise<void>;
123
+ /**
124
+ * Allows you to go to the previous page using the "Previous page" button.
125
+ */
126
+ goToPreviousPage(): Promise<void>;
127
+ }
128
+ /** @public */
129
+ export declare class DataTableSortingHelper {
130
+ private readonly dataTestId;
131
+ private readonly rootHelper;
132
+ /**
133
+ * Gets the root element of the DataTable
134
+ */
135
+ get element(): HTMLDivElement;
136
+ constructor(dataTestId: string, rootHelper: DataTableHelper);
137
+ /**
138
+ * Get a column header by header name
139
+ */
140
+ getColumnHeader(headerName: string | RegExp): Promise<Element | null>;
141
+ /**
142
+ * Will return the current sorting direction of the column provided by the parameter.
143
+ */
144
+ getSortingDirection(
145
+ /** Provide the rendered header string or a RegExp that matches the header cell. */
146
+ headerName: string | RegExp): Promise<'none' | 'ascending' | 'descending' | 'other' | null>;
147
+ /**
148
+ * Will return the current `sortDescFirst` attribute of the column provided by the parameter.
149
+ */
150
+ getSortDescFirst(
151
+ /** Provide the rendered header string or a RegExp that matches the header cell. */
152
+ headerName: string | RegExp): Promise<boolean>;
153
+ /**
154
+ * Lets you sort the column.
155
+ */
156
+ sortColumn(
157
+ /**
158
+ * Header name that should be sorted.
159
+ */
160
+ headerName: string | RegExp, options?: {
161
+ /**
162
+ * The sorting direction needs to be specified when the column has sorting triggers located inside the actions menu.
163
+ */
164
+ direction?: 'ascending' | 'descending';
165
+ /**
166
+ * Enables multi-sorting. The table will sort by the specified column in addition to the columns that are already sorted.
167
+ */
168
+ multiSorting?: boolean;
169
+ }): Promise<void>;
170
+ }
171
+ /** @public */
172
+ export declare class DataTableInteractiveRowsHelper {
173
+ private readonly _rootHelper;
174
+ constructor(_rootHelper: DataTableHelper);
175
+ /**
176
+ * Returns the id of the currently active row or null if no rows are selected.
177
+ */
178
+ getActivatedRowId(): Promise<string | null>;
179
+ /**
180
+ * Toggles the row identified by the given rowId as active.
181
+ */
182
+ toggleActiveRow(rowId: string): Promise<void>;
183
+ }
184
+ /** @public */
185
+ export declare class DataTableDownloadHelper {
186
+ private readonly rootHelper;
187
+ constructor(rootHelper: DataTableHelper);
188
+ private getDownloadMenuTrigger;
189
+ private openDownloadMenu;
190
+ private isMenuOpen;
191
+ private getMenuItem;
192
+ /**
193
+ * Activates the _download all_ item in the DataTable.Toolbar menu.
194
+ */
195
+ downloadAllCSV(): Promise<void>;
196
+ /**
197
+ * Activates the _download current page_ item in the DataTable.Toolbar menu.
198
+ */
199
+ downloadPageCSV(): Promise<void>;
200
+ /**
201
+ * Activates the _download selected_ item in the DataTable.Toolbar menu.
202
+ */
203
+ downloadSelectedRowsCSV(): Promise<void>;
204
+ }
205
+ /** @public */
206
+ export declare class DataTableExpandableRowHelper {
207
+ private readonly rootHelper;
208
+ constructor(rootHelper: DataTableHelper);
209
+ getExpandedRowIds(): Array<string>;
210
+ expandRowById(rowId: string): Promise<void>;
211
+ collapseRowById(rowId: string): Promise<void>;
212
+ toggleRowById(rowId: string): Promise<void>;
213
+ }
214
+ /** @public */
215
+ export declare class DataTableHelper {
216
+ private readonly dataTestId;
217
+ private get tableElement();
218
+ private getHeaderRow;
219
+ private getAllCellsInBodyRow;
220
+ userActions: DataTableUserActionHelper;
221
+ pagination: DataTablePaginationHelper;
222
+ sorting: DataTableSortingHelper;
223
+ rowSelection: DataTableRowSelectionHelper;
224
+ subRows: DataTableSubRowsHelper;
225
+ interactiveRows: DataTableInteractiveRowsHelper;
226
+ download: DataTableDownloadHelper;
227
+ expandableRows: DataTableExpandableRowHelper;
228
+ constructor(dataTestId: string);
229
+ /**
230
+ * Gets the root element of the DataTable
231
+ */
232
+ get element(): HTMLDivElement;
233
+ get headerRowCount(): number;
234
+ getHeaderRowContent(index: number): Array<string | null>;
235
+ getRowContent(index: number): Array<string | null>;
236
+ get rowCount(): number;
237
+ }
238
+ /** @public */
239
+ export declare function getDataTableHelper(testid: string): DataTableHelper;