@@ -586,77 +586,6 @@ describe('DtInput tests', () => {
586586 } ) ;
587587 } ) ;
588588
589- describe ( 'IME Composition Tests' , ( ) => {
590- describe ( 'When type is not a textarea' , ( ) => {
591- it ( 'should not emit input or update:modelValue while composing' , async ( ) => {
592- await nativeInput . trigger ( 'compositionstart' ) ;
593- await nativeInput . trigger ( 'input' ) ;
594-
595- expect ( wrapper . emitted ( ) . input ) . toBeUndefined ( ) ;
596- expect ( wrapper . emitted ( ) [ 'update:modelValue' ] ) . toBeUndefined ( ) ;
597- } ) ;
598-
599- it ( 'should emit input and update:modelValue after composition ends' , async ( ) => {
600- await nativeInput . trigger ( 'compositionstart' ) ;
601- await nativeInput . trigger ( 'input' ) ;
602-
603- nativeInput . element . value = 'か' ;
604- await nativeInput . trigger ( 'compositionend' ) ;
605- await nativeInput . trigger ( 'input' ) ;
606-
607- expect ( wrapper . emitted ( ) . input [ 0 ] [ 0 ] ) . toBe ( 'か' ) ;
608- expect ( wrapper . emitted ( ) [ 'update:modelValue' ] [ 0 ] [ 0 ] ) . toBe ( 'か' ) ;
609- } ) ;
610-
611- it ( 'should resume normal emission after composition ends' , async ( ) => {
612- await nativeInput . trigger ( 'compositionstart' ) ;
613- await nativeInput . trigger ( 'input' ) ;
614- await nativeInput . trigger ( 'compositionend' ) ;
615-
616- nativeInput . element . value = 'hello' ;
617- await nativeInput . trigger ( 'input' ) ;
618-
619- expect ( wrapper . emitted ( ) . input [ 0 ] [ 0 ] ) . toBe ( 'hello' ) ;
620- } ) ;
621- } ) ;
622-
623- describe ( 'When type is a textarea' , ( ) => {
624- beforeEach ( ( ) => {
625- mockProps = { type : 'textarea' } ;
626- updateWrapper ( ) ;
627- } ) ;
628-
629- it ( 'should not emit input or update:modelValue while composing' , async ( ) => {
630- await nativeTextarea . trigger ( 'compositionstart' ) ;
631- await nativeTextarea . trigger ( 'input' ) ;
632-
633- expect ( wrapper . emitted ( ) . input ) . toBeUndefined ( ) ;
634- expect ( wrapper . emitted ( ) [ 'update:modelValue' ] ) . toBeUndefined ( ) ;
635- } ) ;
636-
637- it ( 'should emit input and update:modelValue after composition ends' , async ( ) => {
638- await nativeTextarea . trigger ( 'compositionstart' ) ;
639- await nativeTextarea . trigger ( 'input' ) ;
640-
641- nativeTextarea . element . value = 'か' ;
642- await nativeTextarea . trigger ( 'compositionend' ) ;
643- await nativeTextarea . trigger ( 'input' ) ;
644-
645- expect ( wrapper . emitted ( ) . input [ 0 ] [ 0 ] ) . toBe ( 'か' ) ;
646- expect ( wrapper . emitted ( ) [ 'update:modelValue' ] [ 0 ] [ 0 ] ) . toBe ( 'か' ) ;
647- } ) ;
648-
649- it ( 'should not override textarea value via modelValue watcher while composing' , async ( ) => {
650- nativeTextarea . element . value = 'composing...' ;
651- await nativeTextarea . trigger ( 'compositionstart' ) ;
652-
653- await wrapper . setProps ( { modelValue : 'external update' } ) ;
654-
655- expect ( nativeTextarea . element . value ) . toBe ( 'composing...' ) ;
656- } ) ;
657- } ) ;
658- } ) ;
659-
660589 describe ( 'Extendability Tests' , ( ) => {
661590 it ( 'should handle pass through props/attrs' , async ( ) => {
662591 expect ( nativeInput . attributes ( ) ) . toMatchObject ( baseAttrs ) ;
0 commit comments