Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit 2a01b38

Browse files
committed
test: fix loading
1 parent c32f912 commit 2a01b38

File tree

5 files changed

+29
-33
lines changed

5 files changed

+29
-33
lines changed

src/components/Button/__snapshots__/Button.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ exports[`button > renders with loading and avatar correctly 1`] = `
396396
397397
398398
<span
399-
class="inline-block shrink-0 size-5 opacity-0"
399+
class="inline-block i-lucide-loader shrink-0 size-5 opacity-0"
400400
/>
401401
402402
@@ -424,7 +424,7 @@ exports[`button > renders with loading correctly 1`] = `
424424
425425
426426
<span
427-
class="inline-block shrink-0 size-5 opacity-0"
427+
class="inline-block i-lucide-loader shrink-0 size-5 opacity-0"
428428
/>
429429
430430
@@ -472,7 +472,7 @@ exports[`button > renders with loading trailing and avatar correctly 1`] = `
472472
473473
474474
<span
475-
class="inline-block shrink-0 size-5 opacity-0"
475+
class="inline-block i-lucide-loader shrink-0 size-5 opacity-0"
476476
/>
477477
478478
@@ -500,7 +500,7 @@ exports[`button > renders with loading trailing correctly 1`] = `
500500
501501
502502
<span
503-
class="inline-block shrink-0 size-5 opacity-0"
503+
class="inline-block i-lucide-loader shrink-0 size-5 opacity-0"
504504
/>
505505
506506
@@ -523,7 +523,7 @@ exports[`button > renders with loadingIcon correctly 1`] = `
523523
524524
525525
<span
526-
class="inline-block shrink-0 size-5 opacity-0"
526+
class="inline-block i-lucide-loader shrink-0 size-5 opacity-0"
527527
/>
528528
529529

src/components/CommandPalette/__snapshots__/CommandPalette.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ exports[`commandPalette > renders with labelKey correctly 1`] = `
536536

537537
exports[`commandPalette > renders with loading correctly 1`] = `
538538
"<div dir="ltr" class="flex flex-col min-h-0 min-w-0 divide-y divide-(--ui-border)">
539-
<div class="relative inline-flex items-center [&amp;>input]:h-12"><input type="text" placeholder="Type a command or search..." class="w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-3 py-2 text-sm gap-2 text-(--ui-text-highlighted) bg-transparent ps-10" autocomplete="off" aria-disabled="false" value=""><span class="absolute inset-y-0 start-0 flex items-center ps-3"><!--v-if--></span>
539+
<div class="relative inline-flex items-center [&amp;>input]:h-12"><input type="text" placeholder="Type a command or search..." class="w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-3 py-2 text-sm gap-2 text-(--ui-text-highlighted) bg-transparent ps-10" autocomplete="off" aria-disabled="false" value=""><span class="absolute inset-y-0 start-0 flex items-center ps-3"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"></span></span>
540540
<!--v-if-->
541541
</div>
542542
<div role="listbox" aria-orientation="vertical" aria-multiselectable="false" data-orientation="vertical" class="relative overflow-hidden flex flex-col">

src/components/Input/__snapshots__/Input.test.ts.snap

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -313,20 +313,8 @@ exports[`input > renders with loading and avatar correctly 1`] = `
313313
>
314314
315315
<span
316-
class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated) size-5 text-[10px] shrink-0"
317-
>
318-
319-
<img
320-
class="h-full w-full rounded-[inherit] object-cover"
321-
role="img"
322-
src="https://github.com/benjamincanac.png"
323-
style="display: none;"
324-
/>
325-
<span
326-
class="font-medium leading-none text-(--ui-text-muted) truncate"
327-
/>
328-
329-
</span>
316+
class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"
317+
/>
330318
331319
</span>
332320
<!--v-if-->
@@ -348,7 +336,9 @@ exports[`input > renders with loading correctly 1`] = `
348336
class="absolute inset-y-0 start-0 flex items-center ps-2.5"
349337
>
350338
351-
<!--v-if-->
339+
<span
340+
class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"
341+
/>
352342
353343
</span>
354344
<!--v-if-->
@@ -391,7 +381,9 @@ exports[`input > renders with loading trailing and avatar correctly 1`] = `
391381
class="absolute inset-y-0 end-0 flex items-center pe-2.5"
392382
>
393383
394-
<!--v-if-->
384+
<span
385+
class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5"
386+
/>
395387
396388
</span>
397389
</div>
@@ -413,7 +405,9 @@ exports[`input > renders with loading trailing correctly 1`] = `
413405
class="absolute inset-y-0 end-0 flex items-center pe-2.5"
414406
>
415407
416-
<!--v-if-->
408+
<span
409+
class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"
410+
/>
417411
418412
</span>
419413
</div>
@@ -435,7 +429,9 @@ exports[`input > renders with loadingIcon correctly 1`] = `
435429
class="absolute inset-y-0 start-0 flex items-center ps-2.5"
436430
>
437431
438-
<!--v-if-->
432+
<span
433+
class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"
434+
/>
439435
440436
</span>
441437
<!--v-if-->

src/components/Select/__snapshots__/Select.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,37 +508,37 @@ exports[`select > renders with leadingIcon correctly 1`] = `
508508
`;
509509

510510
exports[`select > renders with loading and avatar correctly 1`] = `
511-
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated) size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" class="h-full w-full rounded-[inherit] object-cover" style="display: none;"><span class="font-medium leading-none text-(--ui-text-muted) truncate"></span></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-chevron-down shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
511+
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
512512
<!--teleport start-->
513513
<!--teleport end-->
514514
<!---->"
515515
`;
516516

517517
exports[`select > renders with loading correctly 1`] = `
518-
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><!--v-if--></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-chevron-down shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
518+
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
519519
<!--teleport start-->
520520
<!--teleport end-->
521521
<!---->"
522522
`;
523523

524524
exports[`select > renders with loading trailing and avatar correctly 1`] = `
525-
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated) size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" class="h-full w-full rounded-[inherit] object-cover" style="display: none;"><span class="font-medium leading-none text-(--ui-text-muted) truncate"></span></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><!--v-if--></span></button>
525+
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated) size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" class="h-full w-full rounded-[inherit] object-cover" style="display: none;"><span class="font-medium leading-none text-(--ui-text-muted) truncate"></span></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
526526
<!--teleport start-->
527527
<!--teleport end-->
528528
<!---->"
529529
`;
530530

531531
exports[`select > renders with loading trailing correctly 1`] = `
532532
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) pe-9">
533-
<!--v-if--><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><!--v-if--></span>
533+
<!--v-if--><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"></span></span>
534534
</button>
535535
<!--teleport start-->
536536
<!--teleport end-->
537537
<!---->"
538538
`;
539539

540540
exports[`select > renders with loadingIcon correctly 1`] = `
541-
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9" loadingicon="i-lucide-sparkles"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><!--v-if--></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-chevron-down shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
541+
"<button role="combobox" type="button" aria-controls="reka-select-content-v-0" aria-expanded="false" aria-required="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-placeholder="" class="relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented) px-2.5 py-1.5 text-sm gap-1.5 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary) ps-9 pe-9" loadingicon="i-lucide-sparkles"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5 animate-spin"></span></span><span class="truncate text-(--ui-text-dimmed)">&nbsp;</span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="inline-block i-lucide-loader shrink-0 text-(--ui-text-dimmed) size-5"></span></span></button>
542542
<!--teleport start-->
543543
<!--teleport end-->
544544
<!---->"

0 commit comments

Comments
 (0)