mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
test(loading): add unit tests
This commit is contained in:
parent
c64608e89f
commit
8be87921f0
3 changed files with 121 additions and 7 deletions
28
tests/Loading/Loading.test.svelte
Normal file
28
tests/Loading/Loading.test.svelte
Normal file
|
@ -0,0 +1,28 @@
|
|||
<script lang="ts">
|
||||
import { Loading } from "carbon-components-svelte";
|
||||
</script>
|
||||
|
||||
<!-- Default loading (with overlay) -->
|
||||
<div data-testid="default-loader">
|
||||
<Loading />
|
||||
</div>
|
||||
|
||||
<!-- Loading without overlay -->
|
||||
<div data-testid="loader-no-overlay">
|
||||
<Loading withOverlay={false} />
|
||||
</div>
|
||||
|
||||
<!-- Small loading -->
|
||||
<div data-testid="loader-small">
|
||||
<Loading withOverlay={false} small />
|
||||
</div>
|
||||
|
||||
<!-- Inactive loading -->
|
||||
<div data-testid="loader-inactive">
|
||||
<Loading active={false} />
|
||||
</div>
|
||||
|
||||
<!-- Custom description -->
|
||||
<div data-testid="loader-description">
|
||||
<Loading description="Processing data..." />
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue