@vtmn/svelte
Advanced tools
Comparing version 2.3.1 to 3.0.0
{ | ||
"name": "@vtmn/svelte", | ||
"version": "2.3.1", | ||
"version": "3.0.0", | ||
"description": "Decathlon Design System - Vitamin Svelte components library", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@vtmn/css": "^1.3.1", | ||
"@vtmn/css": "^2.0.0", | ||
"@vtmn/css-accordion": "^1.1.3", | ||
@@ -52,3 +52,3 @@ "@vtmn/css-alert": "^1.1.1", | ||
"@vtmn/css-modal": "^1.1.1", | ||
"@vtmn/css-navbar": "^1.3.1", | ||
"@vtmn/css-navbar": "^2.0.0", | ||
"@vtmn/css-popover": "^1.1.1", | ||
@@ -134,3 +134,3 @@ "@vtmn/css-price": "^1.1.1", | ||
}, | ||
"gitHead": "f7488a86edb2eec97a4425132d74486624e6bdf2" | ||
"gitHead": "9a1b63f4093ee0e0ab55ace47c68b21f7e663488" | ||
} |
import { render } from '@testing-library/svelte'; | ||
import VtmnNavbarLink from '../VtmnNavbarLink.svelte'; | ||
import VtmnNavbarLink from './VtmnNavbarLinkWithSlot.svelte'; | ||
@@ -11,7 +11,6 @@ describe('<VtmnNavbarLink />', () => { | ||
test('Renders correctly with icon, label & showLabel = true', () => { | ||
test('Renders correctly with icon, label', () => { | ||
const { container, getByText } = render(VtmnNavbarLink, { | ||
icon: 'question-line', | ||
label: 'Contact us', | ||
showLabel: true, | ||
}); | ||
@@ -21,5 +20,2 @@ | ||
expect( | ||
container.getElementsByClassName('vtmn-navbar_link--icon-alone').length, | ||
).toBe(0); | ||
expect( | ||
container.children[0].getElementsByClassName('vtmx-question-line').length, | ||
@@ -30,20 +26,2 @@ ).toBe(1); | ||
test('Renders correctly with icon, label & showLabel = false', () => { | ||
const { container, getByText } = render(VtmnNavbarLink, { | ||
icon: 'question-line', | ||
label: 'Contact us', | ||
showLabel: false, | ||
}); | ||
expect(container).toBeVisible(); | ||
expect( | ||
container.getElementsByClassName('vtmn-navbar_link--icon-alone').length, | ||
).toBe(1); | ||
expect( | ||
container.children[0].getElementsByClassName('vtmx-question-line').length, | ||
).toBe(1); | ||
expect(container.getElementsByClassName('vtmn-sr-only')[0]).toBeDefined(); | ||
expect(getByText('Contact us')).toBeDefined(); | ||
}); | ||
test('Can add custom css classes', () => { | ||
@@ -57,3 +35,3 @@ const { container } = render(VtmnNavbarLink, { | ||
test('Can have custom props', async () => { | ||
test('Can have custom props', () => { | ||
const { container } = render(VtmnNavbarLink, { id: 'test' }); | ||
@@ -63,2 +41,11 @@ | ||
}); | ||
test('Should display a badge', () => { | ||
const { container } = render(VtmnNavbarLink, { | ||
icon: 'question-line', | ||
label: 'Contact us', | ||
badgeValue: 3, | ||
}); | ||
expect(container.querySelector('span[class^="vtmn-badge"]')).toBeVisible(); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157
1515405
31871
+ Added@vtmn/css@2.0.7(transitive)
+ Added@vtmn/css-navbar@2.0.3(transitive)
- Removed@vtmn/css@1.3.1(transitive)
- Removed@vtmn/css-navbar@1.3.1(transitive)
Updated@vtmn/css@^2.0.0
Updated@vtmn/css-navbar@^2.0.0