Skip to content

Commit 9fcb3ef

Browse files
committed
fix: ci pass
1 parent 4fb62e8 commit 9fcb3ef

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

__tests__/bugs/issue-1909-spec.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('#1909', () => {
1212
liquidPlot.render();
1313

1414
// @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);
1616

1717
liquidPlot.update({
1818
liquidStyle: {
@@ -21,7 +21,10 @@ describe('#1909', () => {
2121
});
2222

2323
// @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+
);
2528

2629
liquidPlot.destroy();
2730
});

__tests__/unit/plots/liquid/liquid-style-spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ describe('liquid', () => {
1818
liquid.render();
1919

2020
// @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
2222
// @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
2424

2525
// @ts-ignore
2626
liquid.chart.getController('annotation').clear(true);
@@ -34,7 +34,7 @@ describe('liquid', () => {
3434

3535
// G2 chart.clear 的时候,geometry 销毁了,但是 container 还保留的,内存泄露。
3636
// @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
3838

3939
liquid.destroy();
4040
});

0 commit comments

Comments
 (0)