@vtmn/svelte
Advanced tools
Comparing version 2.1.3 to 2.2.0
{ | ||
"name": "@vtmn/svelte", | ||
"version": "2.1.3", | ||
"version": "2.2.0", | ||
"description": "Decathlon Design System - Vitamin Svelte components library", | ||
@@ -132,3 +132,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "1aecb0c32f3dc39c7f5b98d7dc0db04b98ccc294" | ||
"gitHead": "0b233d93de5269ae15b6c04f566162018709307d" | ||
} |
@@ -5,2 +5,3 @@ import '@testing-library/jest-dom'; | ||
import VtmnTextInput from '../VtmnTextInput.svelte'; | ||
import VtmnTextInputSlot from './VtmnTextInputSlot.svelte'; | ||
@@ -55,2 +56,14 @@ describe('VtmnTextInput', () => { | ||
}); | ||
test('Should display the label component if labelComponent is defined', () => { | ||
const { container, queryByText } = render(VtmnTextInputSlot, { | ||
...params, | ||
}); | ||
expect(queryByText(/Label/)).toBeVisible(); | ||
expect(queryByText(/(Optionnal)/)).toBeVisible(); | ||
expect(queryByText(/Unit test label/i)).toBeNull(); | ||
expect(getTextLabel(container)).toHaveAttribute('for', 'text-input'); | ||
expect(getTextInput(container)).toHaveAttribute('id', 'text-input'); | ||
}); | ||
test('Should display the placeholder', () => { | ||
@@ -57,0 +70,0 @@ const { container } = render(VtmnTextInput, { ...params }); |
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
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
1521458
156
31903