mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-10 13:18:25 +00:00
Update integration tests
This commit is contained in:
@@ -13,7 +13,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -37,6 +37,12 @@ test('renders Lucide public APIs and survives router navigation', async () => {
|
||||
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');
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -22,9 +22,15 @@ test('renders Lucide public APIs and survives router navigation', 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');
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -23,9 +23,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');
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -22,9 +22,15 @@ test('renders Lucide public APIs and survives router navigation', 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 = page.getByTestId('provider-icon');
|
||||
await expect.element(providerIcon).toHaveAttribute('width', '32');
|
||||
await expect.element(providerIcon).toHaveAttribute('stroke', 'purple');
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -30,9 +30,15 @@ test('renders Lucide public APIs and survives router navigation', 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');
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function IconShowcase() {
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider
|
||||
color="purple"
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider>
|
||||
<House data-testid="provider-icon" />
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
color="red"
|
||||
size={48}
|
||||
strokeWidth={4}
|
||||
absoluteStrokeWidth
|
||||
nonScalingStroke
|
||||
/>
|
||||
<LucideProvider>
|
||||
<House data-testid="provider-icon" />
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue';
|
||||
color="red"
|
||||
:size="48"
|
||||
:stroke-width="4"
|
||||
absolute-stroke-width
|
||||
non-scaling-stroke
|
||||
/>
|
||||
<LucideProvider>
|
||||
<House data-testid="provider-icon" />
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue';
|
||||
color="red"
|
||||
:size="48"
|
||||
:stroke-width="4"
|
||||
absolute-stroke-width
|
||||
non-scaling-stroke
|
||||
/>
|
||||
<LucideProvider>
|
||||
<House data-testid="provider-icon" />
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -12,7 +12,7 @@ import LucideProvider from './LucideProvider.vue';
|
||||
color="red"
|
||||
:size="48"
|
||||
:stroke-width="4"
|
||||
absolute-stroke-width
|
||||
non-scaling-stroke
|
||||
/>
|
||||
<LucideProvider>
|
||||
<House data-testid="provider-icon" />
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user