mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
test(overflow-menu): add unit tests
This commit is contained in:
parent
88f4304d5a
commit
306e09961f
4 changed files with 120 additions and 81 deletions
30
tests/OverflowMenu/OverflowMenu.test.svelte
Normal file
30
tests/OverflowMenu/OverflowMenu.test.svelte
Normal file
|
@ -0,0 +1,30 @@
|
|||
<script lang="ts">
|
||||
import { OverflowMenu, OverflowMenuItem } from "carbon-components-svelte";
|
||||
</script>
|
||||
|
||||
<OverflowMenu
|
||||
on:close={(e) => {
|
||||
console.log("close", e.detail); // { index: number; text: string; }
|
||||
}}
|
||||
>
|
||||
<OverflowMenuItem
|
||||
text="Manage credentials"
|
||||
on:click={() => {
|
||||
console.log("click", "Manage credentials");
|
||||
}}
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
href="https://cloud.ibm.com/docs/api-gateway/"
|
||||
text="API documentation"
|
||||
on:click={() => {
|
||||
console.log("click", "API documentation");
|
||||
}}
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
danger
|
||||
text="Delete service"
|
||||
on:click={() => {
|
||||
console.log("click", "Delete service");
|
||||
}}
|
||||
/>
|
||||
</OverflowMenu>
|
Loading…
Add table
Add a link
Reference in a new issue