File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ describe('#1909', () => {
12
12
liquidPlot . render ( ) ;
13
13
14
14
// @ts -ignore
15
- expect ( liquidPlot . chart . geometries [ 0 ] . container . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . attr ( 'opacity' ) ) . toBe ( 0.6 ) ;
15
+ expect ( liquidPlot . chart . geometries [ 0 ] . container . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . attr ( 'opacity' ) ) . toBe ( 0.2 ) ;
16
16
17
17
liquidPlot . update ( {
18
18
liquidStyle : {
@@ -21,7 +21,10 @@ describe('#1909', () => {
21
21
} ) ;
22
22
23
23
// @ts -ignore
24
- expect ( liquidPlot . chart . geometries [ 0 ] . container . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . attr ( 'opacity' ) ) . toBe ( 0.06 ) ;
24
+ expect ( liquidPlot . chart . geometries [ 0 ] . container . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . attr ( 'opacity' ) ) . toBeCloseTo (
25
+ 0.02 ,
26
+ 5
27
+ ) ;
25
28
26
29
liquidPlot . destroy ( ) ;
27
30
} ) ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ describe('liquid', () => {
18
18
liquid . render ( ) ;
19
19
20
20
// @ts -ignore
21
- expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . attr ( 'stroke' ) ) . toBe ( 'blue' ) ; // circle
21
+ expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . attr ( 'stroke' ) ) . toBe ( 'blue' ) ; // circle
22
22
// @ts -ignore
23
- expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . attr ( 'fill' ) ) . toBe ( 'green' ) ; // wave path
23
+ expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . attr ( 'fill' ) ) . toBe ( 'green' ) ; // wave path
24
24
25
25
// @ts -ignore
26
26
liquid . chart . getController ( 'annotation' ) . clear ( true ) ;
@@ -34,7 +34,7 @@ describe('liquid', () => {
34
34
35
35
// G2 chart.clear 的时候,geometry 销毁了,但是 container 还保留的,内存泄露。
36
36
// @ts -ignore
37
- expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . getChildren ( ) [ 0 ] . attr ( 'fill' ) ) . toBe ( 'red' ) ; // wave path
37
+ expect ( liquid . chart . middleGroup . getChildren ( ) [ 0 ] . getChildren ( ) [ 1 ] . getChildren ( ) [ 0 ] . attr ( 'fill' ) ) . toBe ( 'red' ) ; // wave path
38
38
39
39
liquid . destroy ( ) ;
40
40
} ) ;
You can’t perform that action at this time.
0 commit comments