diff --git a/integrations/lucide-react/nextjs/app/IconShowcase.tsx b/integrations/lucide-react/nextjs/app/IconShowcase.tsx index c22829e11..ad45e737d 100644 --- a/integrations/lucide-react/nextjs/app/IconShowcase.tsx +++ b/integrations/lucide-react/nextjs/app/IconShowcase.tsx @@ -13,7 +13,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-react/react-router/app/IconShowcase.tsx b/integrations/lucide-react/react-router/app/IconShowcase.tsx index 3f2427ec9..11e7bbdfc 100644 --- a/integrations/lucide-react/react-router/app/IconShowcase.tsx +++ b/integrations/lucide-react/react-router/app/IconShowcase.tsx @@ -12,7 +12,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { expect(aliasIcon.element().innerHTML).toBe(canonicalIcon.element().innerHTML); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-react/tanstack-router/src/IconShowcase.tsx b/integrations/lucide-react/tanstack-router/src/IconShowcase.tsx index f9b1da045..dca1c40f1 100644 --- a/integrations/lucide-react/tanstack-router/src/IconShowcase.tsx +++ b/integrations/lucide-react/tanstack-router/src/IconShowcase.tsx @@ -11,7 +11,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-react/tanstack-start/src/IconShowcase.tsx b/integrations/lucide-react/tanstack-start/src/IconShowcase.tsx index f9b1da045..dca1c40f1 100644 --- a/integrations/lucide-react/tanstack-start/src/IconShowcase.tsx +++ b/integrations/lucide-react/tanstack-start/src/IconShowcase.tsx @@ -11,7 +11,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-react/vite/src/IconShowcase.tsx b/integrations/lucide-react/vite/src/IconShowcase.tsx index a9c9dba16..45093d855 100644 --- a/integrations/lucide-react/vite/src/IconShowcase.tsx +++ b/integrations/lucide-react/vite/src/IconShowcase.tsx @@ -13,7 +13,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-solid-2/vite/src/IconShowcase.tsx b/integrations/lucide-solid-2/vite/src/IconShowcase.tsx index bd7eefc75..1154b2220 100644 --- a/integrations/lucide-solid-2/vite/src/IconShowcase.tsx +++ b/integrations/lucide-solid-2/vite/src/IconShowcase.tsx @@ -11,7 +11,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = page.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-solid/solid-start/src/IconShowcase.tsx b/integrations/lucide-solid/solid-start/src/IconShowcase.tsx index b98bbd0e1..55307691f 100644 --- a/integrations/lucide-solid/solid-start/src/IconShowcase.tsx +++ b/integrations/lucide-solid/solid-start/src/IconShowcase.tsx @@ -11,7 +11,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-solid/vite/src/IconShowcase.tsx b/integrations/lucide-solid/vite/src/IconShowcase.tsx index b98bbd0e1..55307691f 100644 --- a/integrations/lucide-solid/vite/src/IconShowcase.tsx +++ b/integrations/lucide-solid/vite/src/IconShowcase.tsx @@ -11,7 +11,7 @@ export default function IconShowcase() { color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-svelte/sveltekit/src/lib/IconShowcase.svelte b/integrations/lucide-svelte/sveltekit/src/lib/IconShowcase.svelte index 1fdb8afbb..b22f3dedc 100644 --- a/integrations/lucide-svelte/sveltekit/src/lib/IconShowcase.svelte +++ b/integrations/lucide-svelte/sveltekit/src/lib/IconShowcase.svelte @@ -11,7 +11,7 @@ color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> diff --git a/integrations/lucide-svelte/sveltekit/tests/icons.browser.spec.ts b/integrations/lucide-svelte/sveltekit/tests/icons.browser.spec.ts index 666c296c9..64ee928dd 100644 --- a/integrations/lucide-svelte/sveltekit/tests/icons.browser.spec.ts +++ b/integrations/lucide-svelte/sveltekit/tests/icons.browser.spec.ts @@ -17,9 +17,15 @@ test('renders Lucide public APIs in a real browser', async () => { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-svelte/vite/src/lib/IconShowcase.svelte b/integrations/lucide-svelte/vite/src/lib/IconShowcase.svelte index 1fdb8afbb..b22f3dedc 100644 --- a/integrations/lucide-svelte/vite/src/lib/IconShowcase.svelte +++ b/integrations/lucide-svelte/vite/src/lib/IconShowcase.svelte @@ -11,7 +11,7 @@ color="red" size={48} strokeWidth={4} - absoluteStrokeWidth + nonScalingStroke /> diff --git a/integrations/lucide-svelte/vite/tests/icons.browser.spec.ts b/integrations/lucide-svelte/vite/tests/icons.browser.spec.ts index 422ec13ff..14dccf150 100644 --- a/integrations/lucide-svelte/vite/tests/icons.browser.spec.ts +++ b/integrations/lucide-svelte/vite/tests/icons.browser.spec.ts @@ -17,9 +17,15 @@ test('renders Lucide public APIs in a real browser', async () => { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-vue/nuxt/app/components/IconShowcase.vue b/integrations/lucide-vue/nuxt/app/components/IconShowcase.vue index 376e04446..b1b4c4266 100644 --- a/integrations/lucide-vue/nuxt/app/components/IconShowcase.vue +++ b/integrations/lucide-vue/nuxt/app/components/IconShowcase.vue @@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue'; color="red" :size="48" :stroke-width="4" - absolute-stroke-width + non-scaling-stroke /> diff --git a/integrations/lucide-vue/nuxt/tests/icons.browser.spec.ts b/integrations/lucide-vue/nuxt/tests/icons.browser.spec.ts index eb3beb854..8a00b0a81 100644 --- a/integrations/lucide-vue/nuxt/tests/icons.browser.spec.ts +++ b/integrations/lucide-vue/nuxt/tests/icons.browser.spec.ts @@ -17,9 +17,15 @@ test('renders Lucide public APIs in a real browser', async () => { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-vue/vike/components/IconShowcase.vue b/integrations/lucide-vue/vike/components/IconShowcase.vue index 376e04446..b1b4c4266 100644 --- a/integrations/lucide-vue/vike/components/IconShowcase.vue +++ b/integrations/lucide-vue/vike/components/IconShowcase.vue @@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue'; color="red" :size="48" :stroke-width="4" - absolute-stroke-width + non-scaling-stroke /> diff --git a/integrations/lucide-vue/vike/tests/icons.browser.spec.ts b/integrations/lucide-vue/vike/tests/icons.browser.spec.ts index a6cfcca43..f931fd632 100644 --- a/integrations/lucide-vue/vike/tests/icons.browser.spec.ts +++ b/integrations/lucide-vue/vike/tests/icons.browser.spec.ts @@ -17,9 +17,15 @@ test('renders Lucide public APIs in a real browser', async () => { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple'); diff --git a/integrations/lucide-vue/vite/src/IconShowcase.vue b/integrations/lucide-vue/vite/src/IconShowcase.vue index 376e04446..b1b4c4266 100644 --- a/integrations/lucide-vue/vite/src/IconShowcase.vue +++ b/integrations/lucide-vue/vite/src/IconShowcase.vue @@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue'; color="red" :size="48" :stroke-width="4" - absolute-stroke-width + non-scaling-stroke /> diff --git a/integrations/lucide-vue/vite/tests/icons.browser.spec.ts b/integrations/lucide-vue/vite/tests/icons.browser.spec.ts index 7dc2a6f62..ca446a5d0 100644 --- a/integrations/lucide-vue/vite/tests/icons.browser.spec.ts +++ b/integrations/lucide-vue/vite/tests/icons.browser.spec.ts @@ -17,9 +17,15 @@ test('renders Lucide public APIs in a real browser', async () => { await expect.element(customIcon).toHaveAttribute('width', '48'); await expect.element(customIcon).toHaveAttribute('height', '48'); await expect.element(customIcon).toHaveAttribute('stroke', 'red'); - await expect.element(customIcon).toHaveAttribute('stroke-width', '2'); + await expect.element(customIcon).toHaveAttribute('stroke-width', '4'); await expect.element(customIcon).toHaveClass('consumer-icon'); + const customIconChildren = Array.from(customIcon.element().children); + expect(customIconChildren.length).toBeGreaterThan(0); + for (const child of customIconChildren) { + expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke'); + } + const providerIcon = screen.getByTestId('provider-icon'); await expect.element(providerIcon).toHaveAttribute('width', '32'); await expect.element(providerIcon).toHaveAttribute('stroke', 'purple');