This repository was archived by the owner on Jun 3, 2024. It is now read-only.
File tree 1 file changed +24
-4
lines changed
1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ test('Loading renders', () => {
14
14
</ Loading >
15
15
) ;
16
16
17
- expect ( loading . html ( ) ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
17
+ expect (
18
+ loading
19
+ . find ( '.dash-spinner' )
20
+ . parent ( )
21
+ . html ( )
22
+ ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
18
23
} ) ;
19
24
test ( 'Loading renders without loading_state' , ( ) => {
20
25
const loading = render (
@@ -49,7 +54,12 @@ test('Loading renders without prop_name', () => {
49
54
</ Loading >
50
55
) ;
51
56
52
- expect ( loading . html ( ) ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
57
+ expect (
58
+ loading
59
+ . find ( '.dash-spinner' )
60
+ . parent ( )
61
+ . html ( )
62
+ ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
53
63
} ) ;
54
64
test ( 'Loading renders without loading_state.component_name' , ( ) => {
55
65
const statusMock = {
@@ -62,7 +72,12 @@ test('Loading renders without loading_state.component_name', () => {
62
72
</ Loading >
63
73
) ;
64
74
65
- expect ( loading . html ( ) ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
75
+ expect (
76
+ loading
77
+ . find ( '.dash-spinner' )
78
+ . parent ( )
79
+ . html ( )
80
+ ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
66
81
} ) ;
67
82
test ( 'Loading renders with multiple children' , ( ) => {
68
83
const statusMock = {
@@ -78,7 +93,12 @@ test('Loading renders with multiple children', () => {
78
93
</ Loading >
79
94
) ;
80
95
81
- expect ( loading . html ( ) ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
96
+ expect (
97
+ loading
98
+ . find ( '.dash-spinner' )
99
+ . parent ( )
100
+ . html ( )
101
+ ) . toMatchSnapshot ( 'Loading with is_loading=true' ) ;
82
102
} ) ;
83
103
84
104
test ( "Loading checks all it's children for a loading_state" , ( ) => {
You can’t perform that action at this time.
0 commit comments