Skip to content

Commit 5e474cd

Browse files
committed
refactor: fix failing test
1 parent fb41b35 commit 5e474cd

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

packages/pluggableWidgets/datagrid-web/src/components/__tests__/__snapshots__/ColumnResizer.spec.tsx.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ exports[`Column Resizer renders the structure correctly 1`] = `
1313
class="column-resizer-bar"
1414
/>
1515
</div>
16-
1716
</div>
1817
</body>,
1918
"container": <div>
@@ -25,7 +24,6 @@ exports[`Column Resizer renders the structure correctly 1`] = `
2524
class="column-resizer-bar"
2625
/>
2726
</div>
28-
2927
</div>,
3028
"debug": [Function],
3129
"findAllByAltText": [Function],

packages/pluggableWidgets/datagrid-web/src/features/row-interaction/__tests__/checkbox.spec.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe("'select row' checkbox", () => {
1919
const [item] = objectItems(1);
2020
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
2121
() => ({
22+
type: "checkbox",
2223
item,
2324
pageSize: 10,
2425
selectionType: "Single",
@@ -39,6 +40,7 @@ describe("'select row' checkbox", () => {
3940
const [item] = objectItems(1);
4041
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
4142
() => ({
43+
type: "checkbox",
4244
item,
4345
pageSize: 10,
4446
selectionType: "Single",
@@ -61,6 +63,7 @@ describe("'select row' checkbox", () => {
6163
const [item] = objectItems(1);
6264
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
6365
() => ({
66+
type: "checkbox",
6467
item,
6568
pageSize: 10,
6669
selectionType: "Single",
@@ -81,6 +84,7 @@ describe("'select row' checkbox", () => {
8184
const [item] = objectItems(1);
8285
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
8386
() => ({
87+
type: "checkbox",
8488
item,
8589
pageSize: 10,
8690
selectionType: "Multi",
@@ -101,6 +105,7 @@ describe("'select row' checkbox", () => {
101105
const [item] = objectItems(1);
102106
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
103107
() => ({
108+
type: "checkbox",
104109
item,
105110
pageSize: 10,
106111
selectionType: "Multi",
@@ -121,6 +126,7 @@ describe("'select row' checkbox", () => {
121126
const [item] = objectItems(1);
122127
const props = eventSwitch<CheckboxContext, HTMLInputElement>(
123128
() => ({
129+
type: "checkbox",
124130
item,
125131
pageSize: 10,
126132
selectionType: "Multi",

packages/pluggableWidgets/datagrid-web/src/utils/test-utils.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { dynamic, list, listAttr, listExp } from "@mendix/widget-plugin-test-uti
22
import { ColumnsType, DatagridContainerProps } from "../../typings/DatagridProps";
33
import { ColumnStore } from "../helpers/state/column/ColumnStore";
44
import { IColumnParentStore } from "../helpers/state/ColumnGroupStore";
5-
import { SelectActionHelper } from "../model/services/GridSelectActionsProvider.service";
65
import { ColumnId, GridColumn } from "../typings/GridColumn";
76

87
export const column = (header = "Test", patch?: (col: ColumnsType) => void): ColumnsType => {
@@ -33,16 +32,6 @@ export const column = (header = "Test", patch?: (col: ColumnsType) => void): Col
3332
return c;
3433
};
3534

36-
export function mockSelectionProps(patch?: (props: SelectActionHelper) => SelectActionHelper): SelectActionHelper {
37-
const props = new SelectActionHelper("None", undefined, "checkbox", false, 5, "clear");
38-
39-
if (patch) {
40-
patch(props);
41-
}
42-
43-
return props;
44-
}
45-
4635
export function mockGridColumn(c: ColumnsType, index: number): GridColumn {
4736
const parentStore: IColumnParentStore = {
4837
isLastVisible(_column: ColumnStore): boolean {

0 commit comments

Comments
 (0)