-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(NumberInput): add smoke visual tests (#2024)
- Loading branch information
1 parent
85e5b50
commit dccdde2
Showing
6 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+167 KB
...nput.visual.test.tsx-snapshots/NumberInput-smoke-empty-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.7 KB
...shots/NumberInput-smoke-inside-error-placement-tooltip-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31 KB
...visual.test.tsx-snapshots/NumberInput-smoke-with-error-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+143 KB
...visual.test.tsx-snapshots/NumberInput-smoke-with-value-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import type {Cases, CasesWithName} from '../../../../stories/tests-factory/models'; | ||
import type {NumberInputProps} from '../NumberInput'; | ||
|
||
/* eslint-disable react/jsx-key */ | ||
|
||
export const disabledCases: Array<NumberInputProps['disabled']> = [true]; | ||
|
||
export const hasClearCases: Array<NumberInputProps['hasClear']> = [true]; | ||
|
||
export const pinCases: Cases<NumberInputProps['pin']> = [ | ||
'round-round', | ||
'brick-brick', | ||
'clear-clear', | ||
'round-brick', | ||
'brick-round', | ||
'round-clear', | ||
'clear-round', | ||
'brick-clear', | ||
'clear-brick', | ||
]; | ||
|
||
export const validationStateCases: Cases<NumberInputProps['validationState']> = ['invalid']; | ||
|
||
export const sizeCases: Cases<NumberInputProps['size']> = ['s', 'm', 'l', 'xl']; | ||
|
||
export const viewCases: Cases<NumberInputProps['view']> = ['normal', 'clear']; | ||
|
||
export const errorPlacementCases: Cases<NumberInputProps['errorPlacement']> = ['outside', 'inside']; | ||
|
||
export const startContentCases: CasesWithName<NumberInputProps['startContent']> = [ | ||
['', <div>start</div>], | ||
]; | ||
|
||
export const endContentCases: CasesWithName<NumberInputProps['endContent']> = [ | ||
['', <div>end</div>], | ||
]; | ||
|
||
export const noteCases: CasesWithName<NumberInputProps['note']> = [['', <div>note</div>]]; | ||
|
||
export const labelCases: CasesWithName<NumberInputProps['label']> = [['', 'label']]; | ||
|
||
/* eslint-enable react/jsx-key */ |