Skip to content

Commit deaff12

Browse files
committed
test: fix existing tests
1 parent 6a7369b commit deaff12

File tree

3 files changed

+55
-10
lines changed

3 files changed

+55
-10
lines changed

tests/DataTableAppendColumns.test.svelte

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,64 @@
66
{ key: "port", value: "Port" },
77
{ key: "rule", value: "Rule" },
88
{ key: "overflow", empty: true },
9-
];
9+
] as const;
1010
1111
const rows = [
12-
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },
13-
{ id: "b", name: "Load Balancer 1", port: 443, rule: "Round robin" },
14-
{ id: "c", name: "Load Balancer 2", port: 80, rule: "DNS delegation" },
15-
{ id: "d", name: "Load Balancer 6", port: 3000, rule: "Round robin" },
16-
{ id: "e", name: "Load Balancer 4", port: 443, rule: "Round robin" },
17-
{ id: "f", name: "Load Balancer 5", port: 80, rule: "DNS delegation" },
12+
{
13+
id: "a",
14+
name: "Load Balancer 3",
15+
port: 3000,
16+
rule: "Round robin",
17+
overflow: null,
18+
},
19+
{
20+
id: "b",
21+
name: "Load Balancer 1",
22+
port: 443,
23+
rule: "Round robin",
24+
overflow: null,
25+
},
26+
{
27+
id: "c",
28+
name: "Load Balancer 2",
29+
port: 80,
30+
rule: "DNS delegation",
31+
overflow: null,
32+
},
33+
{
34+
id: "d",
35+
name: "Load Balancer 6",
36+
port: 3000,
37+
rule: "Round robin",
38+
overflow: null,
39+
},
40+
{
41+
id: "e",
42+
name: "Load Balancer 4",
43+
port: 443,
44+
rule: "Round robin",
45+
overflow: null,
46+
},
47+
{
48+
id: "f",
49+
name: "Load Balancer 5",
50+
port: 80,
51+
rule: "DNS delegation",
52+
overflow: null,
53+
},
1854
];
1955
</script>
2056

21-
<DataTable sortable headers="{headers}" rows="{rows}">
57+
<DataTable
58+
sortable
59+
headers="{[
60+
{ key: 'name', value: 'Name' },
61+
{ key: 'port', value: 'Port' },
62+
{ key: 'rule', value: 'Rule' },
63+
{ key: 'overflow', empty: true },
64+
]}"
65+
rows="{rows}"
66+
>
2267
<span slot="cell" let:cell>
2368
{#if cell.key === "overflow"}
2469
<OverflowMenu flipped>

tests/DataTableBatchSelection.test.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{ key: "name", value: "Name" },
66
{ key: "port", value: "Port" },
77
{ key: "rule", value: "Rule" },
8-
];
8+
] as const;
99
1010
const rows = [
1111
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },

tests/RadioSelectableDataTable.test.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{ key: "name", value: "Name" },
66
{ key: "port", value: "Port" },
77
{ key: "rule", value: "Rule" },
8-
];
8+
] as const;
99
1010
const rows = [
1111
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },

0 commit comments

Comments
 (0)