mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
test(select): add unit tests (#2109)
This commit is contained in:
parent
b15bf65f88
commit
5522c5b0b2
5 changed files with 306 additions and 64 deletions
21
tests/Select/Select.group.test.svelte
Normal file
21
tests/Select/Select.group.test.svelte
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script lang="ts">
|
||||
import {
|
||||
Select,
|
||||
SelectItem,
|
||||
SelectItemGroup,
|
||||
} from "carbon-components-svelte";
|
||||
|
||||
export let selected: string | number | undefined = undefined;
|
||||
</script>
|
||||
|
||||
<Select bind:selected data-testid="select-group">
|
||||
<SelectItem value="default" text="Choose an option" disabled hidden />
|
||||
<SelectItemGroup label="Category 1" data-testid="group-1">
|
||||
<SelectItem value="option-1" text="Option 1" />
|
||||
<SelectItem value="option-2" text="Option 2" />
|
||||
</SelectItemGroup>
|
||||
<SelectItemGroup label="Category 2" data-testid="group-2">
|
||||
<SelectItem value="option-3" text="Option 3" />
|
||||
<SelectItem value="option-4" text="Option 4" />
|
||||
</SelectItemGroup>
|
||||
</Select>
|
Loading…
Add table
Add a link
Reference in a new issue