@linzjs/step-ag-grid 15.0.1 → 15.0.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "15.0.1",
5
+ "version": "15.0.2",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -98,7 +98,7 @@
98
98
  "@testing-library/dom": "^9.3.0",
99
99
  "@testing-library/jest-dom": "^5.16.5",
100
100
  "@testing-library/react": "^12.1.5",
101
- "@testing-library/user-event": "^13.5.0",
101
+ "@testing-library/user-event": "^14.4.3",
102
102
  "@trivago/prettier-plugin-sort-imports": "^4.1.1",
103
103
  "@types/debounce-promise": "^3.1.6",
104
104
  "@types/jest": "^29.5.2",
@@ -31,7 +31,7 @@ const _selectRow = async (
31
31
  const isSelected = row.className.includes("ag-row-selected");
32
32
  if (select === "toggle" || (select === "select" && !isSelected) || (select === "deselect" && isSelected)) {
33
33
  const cell = await findCell(rowId, "selection", within);
34
- userEvent.click(cell);
34
+ await userEvent.click(cell);
35
35
  await waitFor(async () => {
36
36
  const row = await findRow(rowId, within);
37
37
  const nowSelected = row.className.includes("ag-row-selected");
@@ -75,14 +75,14 @@ export const findCellContains = async (
75
75
  export const selectCell = async (rowId: string | number, colId: string, within?: HTMLElement): Promise<void> => {
76
76
  await act(async () => {
77
77
  const cell = await findCell(rowId, colId, within);
78
- userEvent.click(cell);
78
+ await userEvent.click(cell);
79
79
  });
80
80
  };
81
81
 
82
82
  export const editCell = async (rowId: number | string, colId: string, within?: HTMLElement): Promise<void> => {
83
83
  await act(async () => {
84
84
  const cell = await findCell(rowId, colId, within);
85
- userEvent.dblClick(cell);
85
+ await userEvent.dblClick(cell);
86
86
  });
87
87
  await waitFor(findOpenPopover);
88
88
  };
@@ -129,8 +129,7 @@ export const validateMenuOptions = async (
129
129
  export const clickMenuOption = async (menuOptionText: string | RegExp): Promise<void> => {
130
130
  await act(async () => {
131
131
  const menuOption = await findMenuOption(menuOptionText);
132
- // eslint-disable-next-line testing-library/await-async-utils
133
- userEvent.click(menuOption);
132
+ await userEvent.click(menuOption);
134
133
  });
135
134
  };
136
135
 
@@ -173,17 +172,17 @@ export const findMultiSelectOption = async (value: string): Promise<HTMLElement>
173
172
 
174
173
  export const clickMultiSelectOption = async (value: string): Promise<void> => {
175
174
  const menuItem = await findMultiSelectOption(value);
176
- menuItem.parentElement && userEvent.click(menuItem.parentElement);
175
+ menuItem.parentElement && (await userEvent.click(menuItem.parentElement));
177
176
  };
178
177
 
179
178
  const typeInput = async (value: string, filter: IQueryQuick): Promise<void> =>
180
179
  act(async () => {
181
180
  const openMenu = await findOpenPopover();
182
181
  const input = await findQuick(filter, openMenu);
183
- userEvent.clear(input);
184
- //'typing' an empty string will cause a console error and it's also unnecessary after the previous clear call
182
+ await userEvent.clear(input);
183
+ //'typing' an empty string will cause a console error, and it's also unnecessary after the previous clear call
185
184
  if (value.length > 0) {
186
- userEvent.type(input, value);
185
+ await userEvent.type(input, value);
187
186
  }
188
187
  });
189
188
 
@@ -222,6 +221,6 @@ export const findActionButton = (text: string, container?: HTMLElement): Promise
222
221
  export const clickActionButton = async (text: string, container?: HTMLElement): Promise<void> => {
223
222
  await act(async () => {
224
223
  const button = await findActionButton(text, container);
225
- userEvent.click(button);
224
+ await userEvent.click(button);
226
225
  });
227
226
  };