@linzjs/step-ag-grid 17.0.2 → 17.0.4
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/dist/src/utils/testUtil.d.ts +8 -0
- package/dist/step-ag-grid.cjs.js +13 -2
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +12 -3
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +1 -0
- package/src/contexts/GridContextProvider.tsx +2 -1
- package/src/utils/storybookTestUtil.ts +2 -3
- package/src/utils/testUtil.ts +10 -0
|
@@ -35,3 +35,11 @@ export declare const closeMenu: () => Promise<void>;
|
|
|
35
35
|
export declare const closePopover: () => Promise<void>;
|
|
36
36
|
export declare const findActionButton: (text: string, container?: HTMLElement) => Promise<HTMLElement>;
|
|
37
37
|
export declare const clickActionButton: (text: string, container?: HTMLElement) => Promise<void>;
|
|
38
|
+
export declare const waitForGridReady: (props?: {
|
|
39
|
+
grid?: HTMLElement;
|
|
40
|
+
timeout: number;
|
|
41
|
+
}) => Promise<void>;
|
|
42
|
+
export declare const waitForGridRows: (props?: {
|
|
43
|
+
grid?: HTMLElement;
|
|
44
|
+
timeout: number;
|
|
45
|
+
}) => Promise<void>;
|
package/dist/step-ag-grid.cjs.js
CHANGED
|
@@ -4389,6 +4389,7 @@ const GridPopoverMenu = (colDef, custom) => GridCell({
|
|
|
4389
4389
|
minWidth: 48,
|
|
4390
4390
|
maxWidth: 48,
|
|
4391
4391
|
width: 40,
|
|
4392
|
+
sortable: false,
|
|
4392
4393
|
editable: colDef.editable != null ? colDef.editable : true,
|
|
4393
4394
|
exportable: false,
|
|
4394
4395
|
cellStyle: { flex: 1, justifyContent: "center" },
|
|
@@ -4891,7 +4892,9 @@ const GridContextProvider = (props) => {
|
|
|
4891
4892
|
gridApi && gridApi.redrawRows(rowNodes ? { rowNodes } : undefined);
|
|
4892
4893
|
}
|
|
4893
4894
|
catch (ex) {
|
|
4894
|
-
|
|
4895
|
+
// Hide errors in jest, but log them in browser
|
|
4896
|
+
if (typeof jest === "undefined")
|
|
4897
|
+
console.error(ex);
|
|
4895
4898
|
}
|
|
4896
4899
|
}, 50), [gridApi]);
|
|
4897
4900
|
// waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
|
|
@@ -25660,7 +25663,13 @@ const findActionButton = (text, container) => findQuick({ tagName: "button", chi
|
|
|
25660
25663
|
const clickActionButton = async (text, container) => {
|
|
25661
25664
|
const button = await findActionButton(text, container);
|
|
25662
25665
|
await user.click(button);
|
|
25663
|
-
};
|
|
25666
|
+
};
|
|
25667
|
+
const waitForGridReady = async (props) => waitForWrapper(() => expect(getAllQuick({ classes: ".Grid-ready" }, props?.grid)).toBeInTheDocument(), {
|
|
25668
|
+
timeout: props?.timeout ?? 5000,
|
|
25669
|
+
});
|
|
25670
|
+
const waitForGridRows = async (props) => waitForWrapper(async () => expect(getAllQuick({ classes: ".ag-row" }, props?.grid).length > 0).toBe(true), {
|
|
25671
|
+
timeout: props?.timeout ?? 5000,
|
|
25672
|
+
});
|
|
25664
25673
|
|
|
25665
25674
|
exports.ActionButton = ActionButton;
|
|
25666
25675
|
exports.ComponentLoadingWrapper = ComponentLoadingWrapper;
|
|
@@ -25789,4 +25798,6 @@ exports.useMenuState = useMenuState;
|
|
|
25789
25798
|
exports.usePostSortRowsHook = usePostSortRowsHook;
|
|
25790
25799
|
exports.validateMenuOptions = validateMenuOptions;
|
|
25791
25800
|
exports.wait = wait$1;
|
|
25801
|
+
exports.waitForGridReady = waitForGridReady;
|
|
25802
|
+
exports.waitForGridRows = waitForGridRows;
|
|
25792
25803
|
//# sourceMappingURL=step-ag-grid.cjs.js.map
|