@@ -3,14 +3,17 @@ import { mount } from '@vue/test-utils'
3
3
import Input , { type InputProps , type InputSlots } from '../../src/runtime/components/Input.vue'
4
4
import ComponentRender from '../component-render'
5
5
import theme from '#build/b24ui/input'
6
-
7
6
import { renderForm } from '../utils/form'
8
7
import type { FormInputEvents } from '~/src/module'
8
+ import ArrowToTheLeftIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheLeftIcon'
9
+ import ArrowToTheRightIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheRightIcon'
10
+ import Search2Icon from '@bitrix24/b24icons-vue/main/Search2Icon'
11
+ import Shining2Icon from '@bitrix24/b24icons-vue/main/Shining2Icon'
9
12
10
13
describe ( 'Input' , ( ) => {
11
14
const sizes = Object . keys ( theme . variants . size ) as any
12
15
// @todo fix this
13
- const variants = [ ]
16
+ // const variants = []
14
17
15
18
it . each ( [
16
19
// Props
@@ -21,33 +24,24 @@ describe('Input', () => {
21
24
[ 'with disabled' , { props : { disabled : true } } ] ,
22
25
[ 'with required' , { props : { required : true } } ] ,
23
26
[ 'with file type' , { props : { type : 'file' } } ] ,
24
- // @todo fix this ////
25
- [ 'with icon' , { props : { icon : 'i-lucide-search' } } ] ,
26
- // @todo fix this ////
27
- [ 'with leading and icon' , { props : { leading : true , icon : 'i-lucide-arrow-left' } } ] ,
28
- // @todo fix this ////
29
- [ 'with leadingIcon' , { props : { leadingIcon : 'i-lucide-arrow-left' } } ] ,
30
- // @todo fix this ////
31
- [ 'with trailing and icon' , { props : { trailing : true , icon : 'i-lucide-arrow-right' } } ] ,
32
- // @todo fix this ////
33
- [ 'with trailingIcon' , { props : { trailingIcon : 'i-lucide-arrow-right' } } ] ,
34
- // @todo fix this ////
35
- [ 'with avatar' , { props : { avatar : { src : 'https://github.com/IgorShevchik.png' } } } ] ,
36
- // @todo fix this ////
37
- [ 'with avatar and leadingIcon' , { props : { avatar : { src : 'https://github.com/IgorShevchik.png' } , leadingIcon : 'i-lucide-arrow-left' } } ] ,
38
- // @todo fix this ////
39
- [ 'with avatar and trailingIcon' , { props : { avatar : { src : 'https://github.com/IgorShevchik.png' } , trailingIcon : 'i-lucide-arrow-right' } } ] ,
27
+ [ 'with icon' , { props : { icon : Search2Icon } } ] ,
28
+ [ 'with leading and icon' , { props : { leading : true , icon : ArrowToTheLeftIcon } } ] ,
29
+ [ 'with leadingIcon' , { props : { leadingIcon : ArrowToTheLeftIcon } } ] ,
30
+ [ 'with trailing and icon' , { props : { trailing : true , icon : ArrowToTheRightIcon } } ] ,
31
+ [ 'with trailingIcon' , { props : { trailingIcon : ArrowToTheRightIcon } } ] ,
32
+ [ 'with avatar' , { props : { avatar : { src : 'https://github.com/bitrix24.png' } } } ] ,
33
+ [ 'with avatar and leadingIcon' , { props : { avatar : { src : 'https://github.com/bitrix24.png' } , leadingIcon : ArrowToTheLeftIcon } } ] ,
34
+ [ 'with avatar and trailingIcon' , { props : { avatar : { src : 'https://github.com/bitrix24.png' } , trailingIcon : ArrowToTheRightIcon } } ] ,
40
35
[ 'with loading' , { props : { loading : true } } ] ,
41
- // @todo fix this ////
42
- [ 'with loading and avatar' , { props : { loading : true , avatar : { src : 'https://github.com/IgorShevchik.png' } } } ] ,
36
+ [ 'with loading and avatar' , { props : { loading : true , avatar : { src : 'https://github.com/bitrix24.png' } } } ] ,
43
37
[ 'with loading trailing' , { props : { loading : true , trailing : true } } ] ,
44
- // @todo fix this ////
45
- [ 'with loading trailing and avatar' , { props : { loading : true , trailing : true , avatar : { src : 'https://github.com/IgorShevchik.png' } } } ] ,
46
- // @todo fix this ////
47
- [ 'with loadingIcon' , { props : { loading : true , loadingIcon : 'i-lucide-sparkles' } } ] ,
38
+ [ 'with loading trailing and avatar' , { props : { loading : true , trailing : true , avatar : { src : 'https://github.com/bitrix24.png' } } } ] ,
39
+ [ 'with loadingIcon' , { props : { loading : true , loadingIcon : Shining2Icon } } ] ,
48
40
...sizes . map ( ( size : string ) => [ `with size ${ size } ` , { props : { size } } ] ) ,
49
- ...variants . map ( ( variant : string ) => [ `with primary variant ${ variant } ` , { props : { variant } } ] ) ,
50
- ...variants . map ( ( variant : string ) => [ `with neutral variant ${ variant } ` , { props : { variant, color : 'neutral' } } ] ) ,
41
+ // @todo fix this
42
+ // ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { variant } }]),
43
+ // @todo fix this
44
+ // ...variants.map((variant: string) => [`with success variant ${variant}`, { props: { variant, color: 'success' } }]),
51
45
[ 'with as' , { props : { as : 'section' } } ] ,
52
46
[ 'with class' , { props : { class : 'absolute' } } ] ,
53
47
[ 'with b24ui' , { props : { b24ui : { base : 'rounded-full' } } } ] ,
0 commit comments