File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
+ exports [` dialog add rootClassName and rootStyle should render correct 1` ] = `
4
+ <div
5
+ class = " rc-dialog-root customize-root-class"
6
+ style = " font-size: 20px;"
7
+ >
8
+ <div
9
+ class = " rc-dialog-mask"
10
+ />
11
+ <div
12
+ class = " rc-dialog-wrap"
13
+ style = " font-size: 10px;"
14
+ tabindex = " -1"
15
+ >
16
+ <div
17
+ aria-modal = " true"
18
+ class = " rc-dialog"
19
+ role = " dialog"
20
+ style = " width: 600px; height: 903px;"
21
+ >
22
+ <div
23
+ style = " outline: none;"
24
+ tabindex = " 0"
25
+ >
26
+ <div
27
+ class = " rc-dialog-section"
28
+ >
29
+ <button
30
+ aria-label = " Close"
31
+ class = " rc-dialog-close"
32
+ type = " button"
33
+ >
34
+ <span
35
+ class = " rc-dialog-close-x"
36
+ />
37
+ </button >
38
+ <div
39
+ class = " rc-dialog-body"
40
+ />
41
+ </div >
42
+ </div >
43
+ <div
44
+ style = " width: 0px; height: 0px; overflow: hidden; outline: none;"
45
+ tabindex = " 0"
46
+ />
47
+ </div >
48
+ </div >
49
+ </div >
50
+ ` ;
51
+
3
52
exports [` dialog add rootClassName should render correct 1` ] = `
4
53
<div
5
54
class = " rc-dialog-root customize-root-class"
Original file line number Diff line number Diff line change @@ -36,12 +36,13 @@ describe('dialog', () => {
36
36
expect ( wrapper . render ( ) ) . toMatchSnapshot ( ) ;
37
37
} ) ;
38
38
39
- it ( 'add rootClassName should render correct' , ( ) => {
39
+ it ( 'add rootClassName and rootStyle should render correct' , ( ) => {
40
40
const spy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
41
41
const wrapper = mount (
42
42
< Dialog
43
43
visible
44
44
rootClassName = "customize-root-class"
45
+ rootStyle = { { fontSize : 20 } }
45
46
style = { { width : 600 } }
46
47
height = { 903 }
47
48
wrapStyle = { { fontSize : 10 } }
@@ -56,6 +57,7 @@ describe('dialog', () => {
56
57
) ;
57
58
expect ( wrapper . find ( '.customize-root-class' ) . length ) . toBeTruthy ( ) ;
58
59
expect ( wrapper . find ( '.rc-dialog-wrap' ) . props ( ) . style . fontSize ) . toBe ( 10 ) ;
60
+ expect ( wrapper . find ( '.rc-dialog-root' ) . props ( ) . style . fontSize ) . toBe ( 20 ) ;
59
61
expect ( wrapper . find ( '.rc-dialog' ) . props ( ) . style . height ) . toEqual ( 903 ) ;
60
62
expect ( wrapper . find ( '.rc-dialog' ) . props ( ) . style . width ) . toEqual ( 600 ) ;
61
63
} ) ;
You can’t perform that action at this time.
0 commit comments