Skip to content

Commit

Permalink
fix(label): correct label selector parameter handling and test case (#…
Browse files Browse the repository at this point in the history
…6532)

* fix(label): correct label selector parameter handling and test case

* test: add snapshot test for issue6020 with log scale line chart rendering

* fix: increase index value for better layout & prevent text overlap
  • Loading branch information
BQXBQX authored Dec 4, 2024
1 parent b31a240 commit f8ce4ee
Show file tree
Hide file tree
Showing 5 changed files with 1,809 additions and 0 deletions.
24 changes: 24 additions & 0 deletions __tests__/integration/issue-6020.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { issue6020 as render } from '../plots/bugfix/issue-6020';
import { createNodeGCanvas } from './utils/createNodeGCanvas';
import { sleep } from './utils/sleep';
import './utils/useSnapshotMatchers';
import './utils/useCustomFetch';

describe('issue6020', () => {
const canvas = createNodeGCanvas(800, 500);

it('issue6020.render() should render expected line chart with log scale', async () => {
const { chart } = render({
canvas,
container: document.createElement('div'),
});
await chart.render();
await sleep(20);
const dir = `${__dirname}/snapshots/bugfix`;
await expect(canvas).toMatchDOMSnapshot(dir, render.name);
});

afterAll(() => {
canvas?.destroy();
});
});
Loading

0 comments on commit f8ce4ee

Please sign in to comment.