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';
3
3
import focusTest from '../../../tests/shared/focusTest' ;
4
4
import { resetWarned } from '../../_util/warning' ;
5
5
import mountTest from '../../../tests/shared/mountTest' ;
6
+ import { ref } from 'vue' ;
6
7
7
8
describe ( 'Switch' , ( ) => {
8
9
focusTest ( Switch ) ;
9
10
mountTest ( Switch ) ;
10
11
11
12
it ( 'should has click wave effect' , async ( ) => {
12
13
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
+ } ;
15
24
} ,
16
25
} ) ;
17
26
wrapper . find ( '.ant-switch' ) . trigger ( 'click' ) ;
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ describe('Typography', () => {
253
253
254
254
describe ( 'editable' , async ( ) => {
255
255
function testStep ( name , submitFunc , expectFunc ) {
256
- it ( name , async ( ) => {
256
+ fit ( name , async ( ) => {
257
257
const onStart = jest . fn ( ) ;
258
258
const onChange = jest . fn ( ) ;
259
259
@@ -286,7 +286,7 @@ describe('Typography', () => {
286
286
287
287
await sleep ( 20 ) ;
288
288
wrapper . find ( 'textarea' ) . element . value = 'Bamboo' ;
289
- wrapper . find ( 'textarea' ) . trigger ( 'change' ) ;
289
+ // wrapper.find('textarea').trigger('change');
290
290
291
291
if ( submitFunc ) {
292
292
submitFunc ( wrapper ) ;
You can’t perform that action at this time.
0 commit comments