Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 committed Aug 29, 2024
1 parent fddeb25 commit ee58268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions __tests__/integration/chart-emit-show-tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('chart.emit', () => {
const dir = `${__dirname}/snapshots/api/${kebabCase('chartEmitShowTooltip')}`;
const columnCanvas = createNodeGCanvas(640, 480);

it('chart.emit enable item tooltip.', async () => {
it('chart.emit tooltip', async () => {
const { finished, chart } = renderColumn({
canvas: columnCanvas,
container: document.createElement('div'),
Expand All @@ -54,10 +54,9 @@ describe('chart.emit', () => {
chart.emit('tooltip:show', {
offsetY: 0,
data: { data: { name: 'Berlin', 月份: 'Aug.', 月均降雨量: 42.4 } },
}),
await sleep(20);
});
await sleep(20);

dispatchFirstElementPointerMoveEvent(columnCanvas);
await expect(columnCanvas).toMatchDOMSnapshot(dir, 'step0', {
fileFormat: 'html',
selector: '.g2-tooltip',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="g2-tooltip-title"
style="color: rgba(0, 0, 0, 0.45); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"
>
Jan.
Aug.
</div>
<ul
class="g2-tooltip-list"
Expand All @@ -24,7 +24,7 @@
>
<span
class="g2-tooltip-list-item-marker"
style="background: rgb(23, 131, 255); width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px;"
style="background: rgb(0, 201, 201); width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px;"
/>
<span
class="g2-tooltip-list-item-name-label"
Expand All @@ -36,10 +36,10 @@
</span>
<span
class="g2-tooltip-list-item-value"
title="18.9"
title="42.4"
style="display: inline-block; float: right; flex: 1; text-align: right; min-width: 28px; margin-left: 30px; color: rgba(0, 0, 0, 0.85); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"
>
18.9
42.4
</span>
</li>
</ul>
Expand Down

0 comments on commit ee58268

Please sign in to comment.