@linzjs/step-ag-grid 7.3.0 → 7.3.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.
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": "7.3.0",
5
+ "version": "7.3.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -328,7 +328,9 @@ export const GridFormDropDown = <RowType extends GridBaseRow>(props: GridFormPop
328
328
  }}
329
329
  >
330
330
  {item.subComponent && (
331
- <item.subComponent key={`${fieldToString(field)}-${index}_subcomponent_inner`} />
331
+ <div className={"subComponent"}>
332
+ <item.subComponent key={`${fieldToString(field)}-${index}_subcomponent_inner`} />
333
+ </div>
332
334
  )}
333
335
  </GridSubComponentContext.Provider>
334
336
  )}
@@ -414,7 +414,9 @@ const MenuSubComponent = (props: {
414
414
  triggerSave,
415
415
  }}
416
416
  >
417
- <item.subComponent />
417
+ <div className={"subComponent"}>
418
+ <item.subComponent />
419
+ </div>
418
420
  </GridSubComponentContext.Provider>
419
421
  )
420
422
  }
@@ -149,7 +149,9 @@ export const GridFormPopoverMenu = <RowType extends GridBaseRow>(props: GridForm
149
149
  triggerSave,
150
150
  }}
151
151
  >
152
- <item.subComponent />
152
+ <div className={"subComponent"}>
153
+ <item.subComponent />
154
+ </div>
153
155
  </GridSubComponentContext.Provider>
154
156
  )
155
157
  }
@@ -35,7 +35,7 @@ export const GridFormSubComponentTextArea = <RowType extends GridBaseRow>(
35
35
  }, [setValid, invalid, value]);
36
36
 
37
37
  return (
38
- <div className={clsx("FreeTextInput LuiDeprecatedForms", props.className)}>
38
+ <div className={clsx("FreeTextInput", props.className)}>
39
39
  <TextAreaInput
40
40
  className={"free-text-input"}
41
41
  value={value}
@@ -1,6 +1,7 @@
1
1
  import { act, waitFor, within } from "@testing-library/react";
2
2
  import userEvent from "@testing-library/user-event";
3
3
  import { findQuick, getAllQuick, getMatcher, getQuick, queryQuick } from "./testQuick";
4
+ import { wait } from "./util";
4
5
 
5
6
  export const findRow = async (rowId: number | string, within?: HTMLElement): Promise<HTMLDivElement> => {
6
7
  return findQuick<HTMLDivElement>({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);
@@ -58,8 +59,8 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
58
59
  await act(async () => {
59
60
  const cell = await findCell(rowId, colId, within);
60
61
  userEvent.dblClick(cell);
61
- await findOpenMenu();
62
62
  });
63
+ await findOpenMenu();
63
64
  };
64
65
 
65
66
  const findOpenMenu = async (): Promise<HTMLElement> => findQuick({ classes: ".szh-menu--state-open" });
@@ -73,13 +74,16 @@ export const queryMenuOption = async (menuOptionText: string | RegExp): Promise<
73
74
  };
74
75
 
75
76
  export const findMenuOption = async (menuOptionText: string | RegExp): Promise<HTMLElement> => {
76
- return await waitFor(async () => {
77
- const menuOption = await queryMenuOption(menuOptionText);
78
- if (menuOption == null) {
79
- throw Error(`Unable to find menu option ${menuOptionText}`);
80
- }
81
- return menuOption;
82
- });
77
+ return await waitFor(
78
+ async () => {
79
+ const menuOption = await queryMenuOption(menuOptionText);
80
+ if (menuOption == null) {
81
+ throw Error(`Unable to find menu option ${menuOptionText}`);
82
+ }
83
+ return menuOption;
84
+ },
85
+ { timeout: 10000 },
86
+ );
83
87
  };
84
88
 
85
89
  export const clickMenuOption = async (menuOptionText: string | RegExp): Promise<void> => {
@@ -96,6 +100,7 @@ export const openAndClickMenuOption = async (
96
100
  within?: HTMLElement,
97
101
  ): Promise<void> => {
98
102
  await editCell(rowId, colId, within);
103
+ await wait(100);
99
104
  await clickMenuOption(menuOptionText);
100
105
  };
101
106
 
@@ -123,13 +128,13 @@ export const clickMultiSelectOption = async (value: string): Promise<void> => {
123
128
 
124
129
  export const typeOtherInput = async (value: string): Promise<void> => {
125
130
  const openMenu = await findOpenMenu();
126
- const otherInput = await findQuick({ tagName: "input[type='text']" }, openMenu);
131
+ const otherInput = await findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu);
127
132
  userEvent.type(otherInput, value);
128
133
  };
129
134
 
130
135
  export const typeOtherTextArea = async (value: string): Promise<void> => {
131
136
  const openMenu = await findOpenMenu();
132
- const otherTextArea = await findQuick({ tagName: "textarea" }, openMenu);
137
+ const otherTextArea = await findQuick({ classes: ".subComponent", child: { tagName: "textarea" } }, openMenu);
133
138
  userEvent.type(otherTextArea, value);
134
139
  };
135
140