File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,24 @@ import { mount } from '@vue/test-utils';
33import focusTest from '../../../tests/shared/focusTest' ;
44import { resetWarned } from '../../_util/warning' ;
55import mountTest from '../../../tests/shared/mountTest' ;
6+ import { ref } from 'vue' ;
67
78describe ( 'Switch' , ( ) => {
89 focusTest ( Switch ) ;
910 mountTest ( Switch ) ;
1011
1112 it ( 'should has click wave effect' , async ( ) => {
1213 const wrapper = mount ( {
13- render ( ) {
14- return < Switch /> ;
14+ setup ( ) {
15+ const checked = ref ( false ) ;
16+ return ( ) => {
17+ return (
18+ < Switch
19+ checked = { checked . value }
20+ onChange = { ( ) => ( checked . value = ! checked . value ) }
21+ > </ Switch >
22+ ) ;
23+ } ;
1524 } ,
1625 } ) ;
1726 wrapper . find ( '.ant-switch' ) . trigger ( 'click' ) ;
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ describe('Typography', () => {
253253
254254 describe ( 'editable' , async ( ) => {
255255 function testStep ( name , submitFunc , expectFunc ) {
256- it ( name , async ( ) => {
256+ fit ( name , async ( ) => {
257257 const onStart = jest . fn ( ) ;
258258 const onChange = jest . fn ( ) ;
259259
@@ -286,7 +286,7 @@ describe('Typography', () => {
286286
287287 await sleep ( 20 ) ;
288288 wrapper . find ( 'textarea' ) . element . value = 'Bamboo' ;
289- wrapper . find ( 'textarea' ) . trigger ( 'change' ) ;
289+ // wrapper.find('textarea').trigger('change');
290290
291291 if ( submitFunc ) {
292292 submitFunc ( wrapper ) ;
You can’t perform that action at this time.
0 commit comments