@vtmn/svelte
Advanced tools
Comparing version 3.2.6 to 4.0.0
{ | ||
"name": "@vtmn/svelte", | ||
"version": "3.2.6", | ||
"version": "4.0.0", | ||
"description": "Decathlon Design System - Vitamin Svelte components library", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@vtmn/css": "^2.0.7", | ||
"@vtmn/css": "^3.0.0", | ||
"@vtmn/css-accordion": "^1.1.6", | ||
@@ -44,3 +44,3 @@ "@vtmn/css-alert": "^1.1.3", | ||
"@vtmn/css-checkbox": "^1.1.3", | ||
"@vtmn/css-chip": "^1.1.3", | ||
"@vtmn/css-chip": "^2.0.0", | ||
"@vtmn/css-design-tokens": "^1.1.2", | ||
@@ -134,3 +134,3 @@ "@vtmn/css-divider": "^1.1.3", | ||
}, | ||
"gitHead": "3d78507af0359b156ecd551508ac48c9d7b8b840" | ||
"gitHead": "eadba185092df2103aa4ea3c6ec6ed41534a9d24" | ||
} |
@@ -178,3 +178,2 @@ import '@testing-library/jest-dom'; | ||
disabled: true, | ||
selected: true, | ||
}); | ||
@@ -187,3 +186,2 @@ await expectedCancelOnElement(getChip(container), component, 0); | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: true, | ||
}); | ||
@@ -202,6 +200,5 @@ | ||
test('Should not trigger click event when the chip is selected', async () => { | ||
test('Should trigger click event', async () => { | ||
const { container, component } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: true, | ||
}); | ||
@@ -216,27 +213,10 @@ | ||
expect(handleClickDefault).toHaveBeenCalledTimes(0); | ||
expect(handleClickDefault).toHaveBeenCalledTimes(1); | ||
expect(handleClickCancel).toHaveBeenCalledTimes(0); | ||
}); | ||
test('Should be selectable', () => { | ||
test('Should display button cancel', () => { | ||
const { container } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: true, | ||
}); | ||
expect(getChip(container)).toHaveClass('vtmn-chip--selected'); | ||
}); | ||
test('Should not display button when chip not selected', () => { | ||
const { container } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: false, | ||
}); | ||
expect(getCancelBtn(container)).toBeUndefined(); | ||
}); | ||
test('Should display button cancel when chip is selected', () => { | ||
const { container } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: true, | ||
}); | ||
expect(getCancelBtn(container)).toBeVisible(); | ||
@@ -253,17 +233,8 @@ }); | ||
test("Should have a tabindex = 0 if it's not selected", () => { | ||
test('Should not have a tabindex', () => { | ||
const { container } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: false, | ||
}); | ||
expect(getChip(container)).toHaveAttribute('tabindex', '0'); | ||
expect(getChip(container)).toHaveAttribute('tabindex'); | ||
}); | ||
test('Should not have a tabindex if chip is selected', () => { | ||
const { container } = render(VtmnChip, { | ||
variant: VTMN_CHIP_VARIANT.INPUT, | ||
selected: true, | ||
}); | ||
expect(getChip(container)).not.toHaveAttribute('tabindex'); | ||
}); | ||
}); | ||
@@ -270,0 +241,0 @@ |
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
1528965
32238
+ Added@vtmn/css@3.0.2(transitive)
+ Added@vtmn/css-chip@2.0.1(transitive)
- Removed@vtmn/css@2.0.7(transitive)
- Removed@vtmn/css-chip@1.1.3(transitive)
Updated@vtmn/css@^3.0.0
Updated@vtmn/css-chip@^2.0.0