From 716ed10068e71b8bdc2a897cbe81ad216e9fce24 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 17 Oct 2024 16:33:50 +0200 Subject: [PATCH] test: consistent avatar urls --- test/components/Alert.spec.ts | 2 +- test/components/Avatar.spec.ts | 4 +- test/components/AvatarGroup.spec.ts | 6 +-- test/components/Breadcrumb.spec.ts | 2 +- test/components/CommandPalette.spec.ts | 2 +- test/components/DropdownMenu.spec.ts | 2 +- test/components/Separator.spec.ts | 2 +- test/components/Tabs.spec.ts | 2 +- test/components/Toast.spec.ts | 2 +- .../__snapshots__/Alert.spec.ts.snap | 2 +- .../__snapshots__/Avatar.spec.ts.snap | 20 ++++----- .../__snapshots__/AvatarGroup.spec.ts.snap | 28 ++++++------- .../__snapshots__/Breadcrumb.spec.ts.snap | 18 ++++---- .../__snapshots__/CommandPalette.spec.ts.snap | 38 ++++++++--------- .../__snapshots__/DropdownMenu.spec.ts.snap | 30 ++++++------- .../__snapshots__/Separator.spec.ts.snap | 2 +- .../__snapshots__/Tabs.spec.ts.snap | 42 +++++++++---------- .../__snapshots__/Toast.spec.ts.snap | 2 +- 18 files changed, 103 insertions(+), 103 deletions(-) diff --git a/test/components/Alert.spec.ts b/test/components/Alert.spec.ts index 1dac5cbe..02edfb36 100644 --- a/test/components/Alert.spec.ts +++ b/test/components/Alert.spec.ts @@ -13,7 +13,7 @@ describe('Alert', () => { ['with title', { props }], ['with description', { props: { ...props, description: 'Description' } }], ['with icon', { props: { ...props, icon: 'i-heroicons-light-bulb' } }], - ['with avatar', { props: { ...props, avatar: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' } } }], + ['with avatar', { props: { ...props, avatar: { src: 'https://github.com/benjamincanac.png' } } }], ['with close', { props: { ...props, close: true } }], ['with closeIcon', { props: { ...props, close: true, closeIcon: 'i-heroicons-trash' } }], ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { ...props, variant } }]), diff --git a/test/components/Avatar.spec.ts b/test/components/Avatar.spec.ts index f1bcba89..034abca5 100644 --- a/test/components/Avatar.spec.ts +++ b/test/components/Avatar.spec.ts @@ -8,11 +8,11 @@ describe('Avatar', () => { it.each([ // Props - ['with src', { props: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' } }], + ['with src', { props: { src: 'https://github.com/benjamincanac.png' } }], ['with alt', { props: { alt: 'Benjamin Canac' } }], ['with text', { props: { text: '+1' } }], ['with icon', { props: { icon: 'i-heroicons-photo' } }], - ...sizes.map((size: string) => [`with size ${size}`, { props: { src: 'https://avatars.githubusercontent.com/u/739984?v=4', size } }]), + ...sizes.map((size: string) => [`with size ${size}`, { props: { src: 'https://github.com/benjamincanac.png', size } }]), ['with class', { props: { class: 'bg-[var(--ui-bg)]' } }], ['with ui', { props: { ui: { fallback: 'font-bold' } } }] ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AvatarProps }) => { diff --git a/test/components/AvatarGroup.spec.ts b/test/components/AvatarGroup.spec.ts index 455b1261..da6deb5d 100644 --- a/test/components/AvatarGroup.spec.ts +++ b/test/components/AvatarGroup.spec.ts @@ -11,9 +11,9 @@ const AvatarGroupWrapper = defineComponent({ UAvatarGroup: AvatarGroup }, template: ` - - - + + + ` }) diff --git a/test/components/Breadcrumb.spec.ts b/test/components/Breadcrumb.spec.ts index e69ad8bf..bacd139f 100644 --- a/test/components/Breadcrumb.spec.ts +++ b/test/components/Breadcrumb.spec.ts @@ -6,7 +6,7 @@ describe('Breadcrumb', () => { const items = [{ label: 'Home', avatar: { - src: 'https://avatars.githubusercontent.com/u/739984?v=4' + src: 'https://github.com/benjamincanac.png' }, to: '/' }, { diff --git a/test/components/CommandPalette.spec.ts b/test/components/CommandPalette.spec.ts index 9a984d0a..4eec4118 100644 --- a/test/components/CommandPalette.spec.ts +++ b/test/components/CommandPalette.spec.ts @@ -52,7 +52,7 @@ describe('CommandPalette', () => { items: [{ label: 'benjamincanac', avatar: { - src: 'https://avatars.githubusercontent.com/u/739984?v=4' + src: 'https://github.com/benjamincanac.png' } }] }] diff --git a/test/components/DropdownMenu.spec.ts b/test/components/DropdownMenu.spec.ts index be06ced6..bb622ace 100644 --- a/test/components/DropdownMenu.spec.ts +++ b/test/components/DropdownMenu.spec.ts @@ -10,7 +10,7 @@ describe('DropdownMenu', () => { [{ label: 'My account', avatar: { - src: 'https://avatars.githubusercontent.com/u/739984?v=4' + src: 'https://github.com/benjamincanac.png' }, type: 'label' }], diff --git a/test/components/Separator.spec.ts b/test/components/Separator.spec.ts index cab48dc7..24941914 100644 --- a/test/components/Separator.spec.ts +++ b/test/components/Separator.spec.ts @@ -12,7 +12,7 @@ describe('Separator', () => { ['with as', { props: { as: 'span' } }], ['with label', { props: { label: '+1' } }], ['with icon', { props: { icon: 'i-heroicons-photo' } }], - ['with avatar', { props: { avatar: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' } } }], + ['with avatar', { props: { avatar: { src: 'https://github.com/benjamincanac.png' } } }], ['with orientation vertical', { props: { orientation: 'vertical' as const } }], ['with decorative', { props: { decorative: true } }], ...types.map((type: string) => [`with type ${type}`, { props: { type } }]), diff --git a/test/components/Tabs.spec.ts b/test/components/Tabs.spec.ts index 21a82961..4e7347de 100644 --- a/test/components/Tabs.spec.ts +++ b/test/components/Tabs.spec.ts @@ -10,7 +10,7 @@ describe('Tabs', () => { const items = [{ label: 'Tab1', avatar: { - src: 'https://avatars.githubusercontent.com/u/739984?v=4' + src: 'https://github.com/benjamincanac.png' }, content: 'This is the content shown for Tab1' }, { diff --git a/test/components/Toast.spec.ts b/test/components/Toast.spec.ts index 88a4a5a4..68855784 100644 --- a/test/components/Toast.spec.ts +++ b/test/components/Toast.spec.ts @@ -31,7 +31,7 @@ describe('Toast', () => { ['with title', { props }], ['with description', { props: { ...props, description: 'This is a toast' } }], ['with icon', { props: { ...props, icon: 'i-heroicons-rocket-launch' } }], - ['with avatar', { props: { ...props, avatar: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' } } }], + ['with avatar', { props: { ...props, avatar: { src: 'https://github.com/benjamincanac.png' } } }], ['with actions', { props: { ...props, actions: [{ label: 'Action' }] } }], ['with description actions', { props: { ...props, description: 'This is a toast', actions: [{ label: 'Action' }] } }], ['without close', { props: { ...props, close: false } }], diff --git a/test/components/__snapshots__/Alert.spec.ts.snap b/test/components/__snapshots__/Alert.spec.ts.snap index 48511037..3925dd02 100644 --- a/test/components/__snapshots__/Alert.spec.ts.snap +++ b/test/components/__snapshots__/Alert.spec.ts.snap @@ -13,7 +13,7 @@ exports[`Alert > renders with as correctly 1`] = ` `; exports[`Alert > renders with avatar correctly 1`] = ` -"
+"
Alert
diff --git a/test/components/__snapshots__/Avatar.spec.ts.snap b/test/components/__snapshots__/Avatar.spec.ts.snap index 1010b8af..359b4b5f 100644 --- a/test/components/__snapshots__/Avatar.spec.ts.snap +++ b/test/components/__snapshots__/Avatar.spec.ts.snap @@ -6,25 +6,25 @@ exports[`Avatar > renders with class correctly 1`] = `""`; -exports[`Avatar > renders with size 2xl correctly 1`] = `""`; +exports[`Avatar > renders with size 2xl correctly 1`] = `""`; -exports[`Avatar > renders with size 2xs correctly 1`] = `""`; +exports[`Avatar > renders with size 2xs correctly 1`] = `""`; -exports[`Avatar > renders with size 3xl correctly 1`] = `""`; +exports[`Avatar > renders with size 3xl correctly 1`] = `""`; -exports[`Avatar > renders with size 3xs correctly 1`] = `""`; +exports[`Avatar > renders with size 3xs correctly 1`] = `""`; -exports[`Avatar > renders with size lg correctly 1`] = `""`; +exports[`Avatar > renders with size lg correctly 1`] = `""`; -exports[`Avatar > renders with size md correctly 1`] = `""`; +exports[`Avatar > renders with size md correctly 1`] = `""`; -exports[`Avatar > renders with size sm correctly 1`] = `""`; +exports[`Avatar > renders with size sm correctly 1`] = `""`; -exports[`Avatar > renders with size xl correctly 1`] = `""`; +exports[`Avatar > renders with size xl correctly 1`] = `""`; -exports[`Avatar > renders with size xs correctly 1`] = `""`; +exports[`Avatar > renders with size xs correctly 1`] = `""`; -exports[`Avatar > renders with src correctly 1`] = `""`; +exports[`Avatar > renders with src correctly 1`] = `""`; exports[`Avatar > renders with text correctly 1`] = `"+1"`; diff --git a/test/components/__snapshots__/AvatarGroup.spec.ts.snap b/test/components/__snapshots__/AvatarGroup.spec.ts.snap index 07fe6922..afab6f5d 100644 --- a/test/components/__snapshots__/AvatarGroup.spec.ts.snap +++ b/test/components/__snapshots__/AvatarGroup.spec.ts.snap @@ -1,77 +1,77 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`AvatarGroup > renders with as correctly 1`] = `"NRRHBC"`; +exports[`AvatarGroup > renders with as correctly 1`] = `"NRRHBC"`; exports[`AvatarGroup > renders with class correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with default slot correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; -exports[`AvatarGroup > renders with max correctly 1`] = `"
+1RHBC
"`; +exports[`AvatarGroup > renders with max correctly 1`] = `"
+1RHBC
"`; exports[`AvatarGroup > renders with size 2xl correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size 2xs correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size 3xl correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size 3xs correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size lg correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size md correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size sm correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size xl correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with size xs correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; exports[`AvatarGroup > renders with ui correctly 1`] = ` "
- NRRHBC + NRRHBC
" `; diff --git a/test/components/__snapshots__/Breadcrumb.spec.ts.snap b/test/components/__snapshots__/Breadcrumb.spec.ts.snap index e532284a..241e0614 100644 --- a/test/components/__snapshots__/Breadcrumb.spec.ts.snap +++ b/test/components/__snapshots__/Breadcrumb.spec.ts.snap @@ -3,7 +3,7 @@ exports[`Breadcrumb > renders with class correctly 1`] = ` "
    -
  1. Home
  2. +
  3. Home
  4. Components
  5. @@ -16,7 +16,7 @@ exports[`Breadcrumb > renders with class correctly 1`] = ` exports[`Breadcrumb > renders with custom slot correctly 1`] = ` "
      -
    1. Home
    2. +
    3. Home
    4. Components
    5. @@ -42,7 +42,7 @@ exports[`Breadcrumb > renders with item slot correctly 1`] = ` exports[`Breadcrumb > renders with item-label slot correctly 1`] = ` "
        -
      1. Item label slot
      2. +
      3. Item label slot
      4. Item label slot
      5. @@ -68,7 +68,7 @@ exports[`Breadcrumb > renders with item-leading slot correctly 1`] = ` exports[`Breadcrumb > renders with item-trailing slot correctly 1`] = ` "
          -
        1. HomeItem trailing slot
        2. +
        3. HomeItem trailing slot
        4. ComponentsItem trailing slot
        5. @@ -81,7 +81,7 @@ exports[`Breadcrumb > renders with item-trailing slot correctly 1`] = ` exports[`Breadcrumb > renders with items correctly 1`] = ` "
            -
          1. Home
          2. +
          3. Home
          4. Components
          5. @@ -94,7 +94,7 @@ exports[`Breadcrumb > renders with items correctly 1`] = ` exports[`Breadcrumb > renders with labelKey correctly 1`] = ` "
              -
            1. +
            2. @@ -109,7 +109,7 @@ exports[`Breadcrumb > renders with labelKey correctly 1`] = ` exports[`Breadcrumb > renders with separator slot correctly 1`] = ` "
                -
              1. Home
              2. +
              3. Home
              4. Components
              5. @@ -122,7 +122,7 @@ exports[`Breadcrumb > renders with separator slot correctly 1`] = ` exports[`Breadcrumb > renders with separatorIcon correctly 1`] = ` "
                  -
                1. Home
                2. +
                3. Home
                4. Components
                5. @@ -135,7 +135,7 @@ exports[`Breadcrumb > renders with separatorIcon correctly 1`] = ` exports[`Breadcrumb > renders with ui correctly 1`] = ` "
                    -
                  1. Home
                  2. +
                  3. Home
                  4. Components
                  5. diff --git a/test/components/__snapshots__/CommandPalette.spec.ts.snap b/test/components/__snapshots__/CommandPalette.spec.ts.snap index 74e92050..73249f9a 100644 --- a/test/components/__snapshots__/CommandPalette.spec.ts.snap +++ b/test/components/__snapshots__/CommandPalette.spec.ts.snap @@ -38,7 +38,7 @@ exports[`CommandPalette > renders with as correctly 1`] = `
                  Users
                  -
                  benjamincanac
                  +
                  benjamincanac