Skip to content

Commit

Permalink
test: fix existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Apr 20, 2024
1 parent 6a7369b commit 3b35e50
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 11 deletions.
56 changes: 48 additions & 8 deletions tests/DataTableAppendColumns.test.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,59 @@
{ key: "port", value: "Port" },
{ key: "rule", value: "Rule" },
{ key: "overflow", empty: true },
];
] as const;
const rows = [
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },
{ id: "b", name: "Load Balancer 1", port: 443, rule: "Round robin" },
{ id: "c", name: "Load Balancer 2", port: 80, rule: "DNS delegation" },
{ id: "d", name: "Load Balancer 6", port: 3000, rule: "Round robin" },
{ id: "e", name: "Load Balancer 4", port: 443, rule: "Round robin" },
{ id: "f", name: "Load Balancer 5", port: 80, rule: "DNS delegation" },
{
id: "a",
name: "Load Balancer 3",
port: 3000,
rule: "Round robin",
overflow: null,
},
{
id: "b",
name: "Load Balancer 1",
port: 443,
rule: "Round robin",
overflow: null,
},
{
id: "c",
name: "Load Balancer 2",
port: 80,
rule: "DNS delegation",
overflow: null,
},
{
id: "d",
name: "Load Balancer 6",
port: 3000,
rule: "Round robin",
overflow: null,
},
{
id: "e",
name: "Load Balancer 4",
port: 443,
rule: "Round robin",
overflow: null,
},
{
id: "f",
name: "Load Balancer 5",
port: 80,
rule: "DNS delegation",
overflow: null,
},
];
</script>

<DataTable sortable headers="{headers}" rows="{rows}">
<DataTable
sortable
headers="{headers}"
rows="{rows}"
>
<span slot="cell" let:cell>
{#if cell.key === "overflow"}
<OverflowMenu flipped>
Expand Down
2 changes: 1 addition & 1 deletion tests/DataTableBatchSelection.test.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ key: "name", value: "Name" },
{ key: "port", value: "Port" },
{ key: "rule", value: "Rule" },
];
] as const;
const rows = [
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },
Expand Down
2 changes: 1 addition & 1 deletion tests/RadioSelectableDataTable.test.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ key: "name", value: "Name" },
{ key: "port", value: "Port" },
{ key: "rule", value: "Rule" },
];
] as const;
const rows = [
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },
Expand Down
2 changes: 1 addition & 1 deletion tests/SelectableDataTable.test.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ key: "name", value: "Name" },
{ key: "port", value: "Port" },
{ key: "rule", value: "Rule" },
];
] as const;
const rows = [
{ id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },
Expand Down

0 comments on commit 3b35e50

Please sign in to comment.