@linzjs/step-ag-grid 28.2.1 → 28.2.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/dist/src/utils/__tests__/testQuick.ts +1 -1
- package/dist/src/utils/__tests__/testUtil.ts +7 -7
- package/dist/src/utils/__tests__/vitestUtil.ts +7 -7
- package/package.json +1 -1
- package/src/utils/__tests__/testQuick.ts +1 -1
- package/src/utils/__tests__/testUtil.ts +7 -7
- package/src/utils/__tests__/vitestUtil.ts +7 -7
|
@@ -147,7 +147,7 @@ export const getQuick = (filter: IQueryQuick, container?: HTMLElement): HTMLElem
|
|
|
147
147
|
* @return HTMLElement. Throws exception if not found.
|
|
148
148
|
*/
|
|
149
149
|
export const findQuick = async <T extends HTMLElement>(filter: IQueryQuick, container?: HTMLElement): Promise<T> => {
|
|
150
|
-
const endTime = Date.now() +
|
|
150
|
+
const endTime = Date.now() + 1000;
|
|
151
151
|
while (Date.now() < endTime) {
|
|
152
152
|
const el = queryQuick<T>(filter, container);
|
|
153
153
|
if (el) return el;
|
|
@@ -130,7 +130,7 @@ export const findCellContains = async (
|
|
|
130
130
|
const row = await findRow(rowId, within);
|
|
131
131
|
return getQuick({ tagName: `[col-id='${colId}']`, text }, row);
|
|
132
132
|
},
|
|
133
|
-
{ timeout:
|
|
133
|
+
{ timeout: 2200 },
|
|
134
134
|
);
|
|
135
135
|
};
|
|
136
136
|
|
|
@@ -140,7 +140,7 @@ export const selectCell = async (rowId: string | number, colId: string, within?:
|
|
|
140
140
|
const cell = await findCell(rowId, colId, within);
|
|
141
141
|
await user.click(cell);
|
|
142
142
|
},
|
|
143
|
-
{ timeout:
|
|
143
|
+
{ timeout: 2200 },
|
|
144
144
|
);
|
|
145
145
|
};
|
|
146
146
|
|
|
@@ -149,9 +149,9 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
|
|
|
149
149
|
async () => {
|
|
150
150
|
const cell = await findCell(rowId, colId, within);
|
|
151
151
|
await user.dblClick(cell);
|
|
152
|
-
await waitFor(findOpenPopover
|
|
152
|
+
await waitFor(findOpenPopover);
|
|
153
153
|
},
|
|
154
|
-
{ timeout:
|
|
154
|
+
{ timeout: 2200 },
|
|
155
155
|
);
|
|
156
156
|
};
|
|
157
157
|
|
|
@@ -179,7 +179,7 @@ export const findMenuOption = async (menuOptionText: string | RegExp): Promise<H
|
|
|
179
179
|
}
|
|
180
180
|
return menuOption;
|
|
181
181
|
},
|
|
182
|
-
{ timeout:
|
|
182
|
+
{ timeout: 4000 },
|
|
183
183
|
);
|
|
184
184
|
};
|
|
185
185
|
|
|
@@ -311,12 +311,12 @@ export const clickActionButton = async (text: string, container?: HTMLElement):
|
|
|
311
311
|
|
|
312
312
|
export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
313
313
|
waitFor(() => expect(getAllQuick({ classes: '.Grid-ready' }, props?.grid)).toBeDefined(), {
|
|
314
|
-
timeout: props?.timeout ??
|
|
314
|
+
timeout: props?.timeout ?? 4000,
|
|
315
315
|
});
|
|
316
316
|
|
|
317
317
|
export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
318
318
|
waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
|
|
319
|
-
timeout: props?.timeout ??
|
|
319
|
+
timeout: props?.timeout ?? 4000,
|
|
320
320
|
});
|
|
321
321
|
|
|
322
322
|
export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
|
|
@@ -131,7 +131,7 @@ export const findCellContains = async (
|
|
|
131
131
|
const row = await findRow(rowId, within);
|
|
132
132
|
return getQuick({ tagName: `[col-id='${colId}']`, text }, row);
|
|
133
133
|
},
|
|
134
|
-
{ timeout:
|
|
134
|
+
{ timeout: 2200 },
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
137
|
|
|
@@ -141,7 +141,7 @@ export const selectCell = async (rowId: string | number, colId: string, within?:
|
|
|
141
141
|
const cell = await findCell(rowId, colId, within);
|
|
142
142
|
await user.click(cell);
|
|
143
143
|
},
|
|
144
|
-
{ timeout:
|
|
144
|
+
{ timeout: 2200 },
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
147
|
|
|
@@ -150,9 +150,9 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
|
|
|
150
150
|
async () => {
|
|
151
151
|
const cell = await findCell(rowId, colId, within);
|
|
152
152
|
await user.dblClick(cell);
|
|
153
|
-
await waitFor(findOpenPopover
|
|
153
|
+
await waitFor(findOpenPopover);
|
|
154
154
|
},
|
|
155
|
-
{ timeout:
|
|
155
|
+
{ timeout: 2200 },
|
|
156
156
|
);
|
|
157
157
|
};
|
|
158
158
|
|
|
@@ -180,7 +180,7 @@ export const findMenuOption = async (menuOptionText: string | RegExp): Promise<H
|
|
|
180
180
|
}
|
|
181
181
|
return menuOption;
|
|
182
182
|
},
|
|
183
|
-
{ timeout:
|
|
183
|
+
{ timeout: 4000 },
|
|
184
184
|
);
|
|
185
185
|
};
|
|
186
186
|
|
|
@@ -312,12 +312,12 @@ export const clickActionButton = async (text: string, container?: HTMLElement):
|
|
|
312
312
|
|
|
313
313
|
export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
314
314
|
waitFor(() => expect(getAllQuick({ classes: '.Grid-ready' }, props?.grid)).toBeDefined(), {
|
|
315
|
-
timeout: props?.timeout ??
|
|
315
|
+
timeout: props?.timeout ?? 4000,
|
|
316
316
|
});
|
|
317
317
|
|
|
318
318
|
export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
319
319
|
waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
|
|
320
|
-
timeout: props?.timeout ??
|
|
320
|
+
timeout: props?.timeout ?? 4000,
|
|
321
321
|
});
|
|
322
322
|
|
|
323
323
|
export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
|
package/package.json
CHANGED
|
@@ -147,7 +147,7 @@ export const getQuick = (filter: IQueryQuick, container?: HTMLElement): HTMLElem
|
|
|
147
147
|
* @return HTMLElement. Throws exception if not found.
|
|
148
148
|
*/
|
|
149
149
|
export const findQuick = async <T extends HTMLElement>(filter: IQueryQuick, container?: HTMLElement): Promise<T> => {
|
|
150
|
-
const endTime = Date.now() +
|
|
150
|
+
const endTime = Date.now() + 1000;
|
|
151
151
|
while (Date.now() < endTime) {
|
|
152
152
|
const el = queryQuick<T>(filter, container);
|
|
153
153
|
if (el) return el;
|
|
@@ -130,7 +130,7 @@ export const findCellContains = async (
|
|
|
130
130
|
const row = await findRow(rowId, within);
|
|
131
131
|
return getQuick({ tagName: `[col-id='${colId}']`, text }, row);
|
|
132
132
|
},
|
|
133
|
-
{ timeout:
|
|
133
|
+
{ timeout: 2200 },
|
|
134
134
|
);
|
|
135
135
|
};
|
|
136
136
|
|
|
@@ -140,7 +140,7 @@ export const selectCell = async (rowId: string | number, colId: string, within?:
|
|
|
140
140
|
const cell = await findCell(rowId, colId, within);
|
|
141
141
|
await user.click(cell);
|
|
142
142
|
},
|
|
143
|
-
{ timeout:
|
|
143
|
+
{ timeout: 2200 },
|
|
144
144
|
);
|
|
145
145
|
};
|
|
146
146
|
|
|
@@ -149,9 +149,9 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
|
|
|
149
149
|
async () => {
|
|
150
150
|
const cell = await findCell(rowId, colId, within);
|
|
151
151
|
await user.dblClick(cell);
|
|
152
|
-
await waitFor(findOpenPopover
|
|
152
|
+
await waitFor(findOpenPopover);
|
|
153
153
|
},
|
|
154
|
-
{ timeout:
|
|
154
|
+
{ timeout: 2200 },
|
|
155
155
|
);
|
|
156
156
|
};
|
|
157
157
|
|
|
@@ -179,7 +179,7 @@ export const findMenuOption = async (menuOptionText: string | RegExp): Promise<H
|
|
|
179
179
|
}
|
|
180
180
|
return menuOption;
|
|
181
181
|
},
|
|
182
|
-
{ timeout:
|
|
182
|
+
{ timeout: 4000 },
|
|
183
183
|
);
|
|
184
184
|
};
|
|
185
185
|
|
|
@@ -311,12 +311,12 @@ export const clickActionButton = async (text: string, container?: HTMLElement):
|
|
|
311
311
|
|
|
312
312
|
export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
313
313
|
waitFor(() => expect(getAllQuick({ classes: '.Grid-ready' }, props?.grid)).toBeDefined(), {
|
|
314
|
-
timeout: props?.timeout ??
|
|
314
|
+
timeout: props?.timeout ?? 4000,
|
|
315
315
|
});
|
|
316
316
|
|
|
317
317
|
export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
318
318
|
waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
|
|
319
|
-
timeout: props?.timeout ??
|
|
319
|
+
timeout: props?.timeout ?? 4000,
|
|
320
320
|
});
|
|
321
321
|
|
|
322
322
|
export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
|
|
@@ -131,7 +131,7 @@ export const findCellContains = async (
|
|
|
131
131
|
const row = await findRow(rowId, within);
|
|
132
132
|
return getQuick({ tagName: `[col-id='${colId}']`, text }, row);
|
|
133
133
|
},
|
|
134
|
-
{ timeout:
|
|
134
|
+
{ timeout: 2200 },
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
137
|
|
|
@@ -141,7 +141,7 @@ export const selectCell = async (rowId: string | number, colId: string, within?:
|
|
|
141
141
|
const cell = await findCell(rowId, colId, within);
|
|
142
142
|
await user.click(cell);
|
|
143
143
|
},
|
|
144
|
-
{ timeout:
|
|
144
|
+
{ timeout: 2200 },
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
147
|
|
|
@@ -150,9 +150,9 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
|
|
|
150
150
|
async () => {
|
|
151
151
|
const cell = await findCell(rowId, colId, within);
|
|
152
152
|
await user.dblClick(cell);
|
|
153
|
-
await waitFor(findOpenPopover
|
|
153
|
+
await waitFor(findOpenPopover);
|
|
154
154
|
},
|
|
155
|
-
{ timeout:
|
|
155
|
+
{ timeout: 2200 },
|
|
156
156
|
);
|
|
157
157
|
};
|
|
158
158
|
|
|
@@ -180,7 +180,7 @@ export const findMenuOption = async (menuOptionText: string | RegExp): Promise<H
|
|
|
180
180
|
}
|
|
181
181
|
return menuOption;
|
|
182
182
|
},
|
|
183
|
-
{ timeout:
|
|
183
|
+
{ timeout: 4000 },
|
|
184
184
|
);
|
|
185
185
|
};
|
|
186
186
|
|
|
@@ -312,12 +312,12 @@ export const clickActionButton = async (text: string, container?: HTMLElement):
|
|
|
312
312
|
|
|
313
313
|
export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
314
314
|
waitFor(() => expect(getAllQuick({ classes: '.Grid-ready' }, props?.grid)).toBeDefined(), {
|
|
315
|
-
timeout: props?.timeout ??
|
|
315
|
+
timeout: props?.timeout ?? 4000,
|
|
316
316
|
});
|
|
317
317
|
|
|
318
318
|
export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: number }) =>
|
|
319
319
|
waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
|
|
320
|
-
timeout: props?.timeout ??
|
|
320
|
+
timeout: props?.timeout ?? 4000,
|
|
321
321
|
});
|
|
322
322
|
|
|
323
323
|
export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
|