1
1
/* eslint-disable func-names */
2
2
import expect from 'expect.js' ;
3
3
import Dialog from '../index' ;
4
- import '../assets/bootstrap.less' ;
4
+ // import '../assets/bootstrap.less';
5
5
import $ from 'jquery' ;
6
6
import React from 'react' ;
7
7
import ReactDOM from 'react-dom' ;
@@ -63,7 +63,7 @@ describe('dialog', () => {
63
63
visible : true ,
64
64
} ) ;
65
65
setTimeout ( ( ) => {
66
- expect ( $ ( '.rc -dialog-wrap' ) . css ( 'display' ) )
66
+ expect ( $ ( '.rmc -dialog-wrap' ) . css ( 'display' ) )
67
67
. to . be ( 'block' ) ;
68
68
done ( ) ;
69
69
} , 10 ) ;
@@ -77,20 +77,16 @@ describe('dialog', () => {
77
77
visible : false ,
78
78
} ) ;
79
79
setTimeout ( ( ) => {
80
- expect ( $ ( '.rc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
80
+ expect ( $ ( '.rmc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
81
81
done ( ) ;
82
82
} , 10 ) ;
83
83
} ) ;
84
84
85
- it ( 'create' , ( ) => {
86
- expect ( $ ( '.rc-dialog' ) . length ) . to . be ( 0 ) ;
87
- } ) ;
88
-
89
85
it ( 'mask' , ( ) => {
90
86
dialog . setState ( {
91
87
visible : true ,
92
88
} ) ;
93
- expect ( $ ( '.rc -dialog-mask' ) . length ) . to . be ( 1 ) ;
89
+ expect ( $ ( '.rmc -dialog-mask' ) . length ) . to . be ( 1 ) ;
94
90
} ) ;
95
91
96
92
it ( 'click close' , ( finish ) => {
@@ -100,12 +96,12 @@ describe('dialog', () => {
100
96
} ) ;
101
97
setTimeout ( done , 10 ) ;
102
98
} , ( done ) => {
103
- const btn = $ ( '.rc -dialog-close' ) [ 0 ] ;
99
+ const btn = $ ( '.rmc -dialog-close' ) [ 0 ] ;
104
100
Simulate . click ( btn ) ;
105
101
setTimeout ( done , 10 ) ;
106
102
} , ( done ) => {
107
103
expect ( callback1 ) . to . be ( 1 ) ;
108
- expect ( $ ( '.rc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
104
+ expect ( $ ( '.rmc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
109
105
done ( ) ;
110
106
} ] , finish ) ;
111
107
} ) ;
@@ -117,13 +113,13 @@ describe('dialog', () => {
117
113
} ) ;
118
114
setTimeout ( done , 500 ) ;
119
115
} , ( done ) => {
120
- const mask = $ ( '.rc -dialog-wrap' ) [ 0 ] ;
116
+ const mask = $ ( '.rmc -dialog-wrap' ) [ 0 ] ;
121
117
Simulate . click ( mask ) ;
122
118
setTimeout ( done , 10 ) ;
123
119
} , ( done ) => {
124
120
// dialog should closed after mask click
125
121
expect ( callback1 ) . to . be ( 1 ) ;
126
- expect ( $ ( '.rc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
122
+ expect ( $ ( '.rmc -dialog-wrap' ) . length ) . to . be ( 0 ) ;
127
123
done ( ) ;
128
124
} , ( done ) => {
129
125
dialog . setState ( {
@@ -135,7 +131,7 @@ describe('dialog', () => {
135
131
} , ( done ) => {
136
132
// dialog should stay on visible after mask click if set maskClosable to false
137
133
// expect(callback1).to.be(0);
138
- expect ( $ ( '.rc -dialog-wrap' ) . css ( 'display' ) )
134
+ expect ( $ ( '.rmc -dialog-wrap' ) . css ( 'display' ) )
139
135
. to . be ( 'block' ) ;
140
136
done ( ) ;
141
137
} ] , finish ) ;
0 commit comments