mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Chart builder: data-aware defaults, one-click hint fixes, canvas preview, fullscreen modal
This commit is contained in:
@@ -127,6 +127,19 @@ describe('sort / stack', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('applyWarningFix', () => {
|
||||
test('applies a hint fix to the working config (actionable hints, §06)', () => {
|
||||
const id = seedDataset('Nums', [
|
||||
{ a: 1, b: 2 },
|
||||
{ a: 3, b: 4 },
|
||||
]);
|
||||
cb().init(id);
|
||||
cb().setMark('bar'); // two quantitative axes on a bar → "scatter" hint with a fix
|
||||
cb().applyWarningFix({ label: 'Switch to Point', apply: (c) => ({ ...c, mark: 'point' }) });
|
||||
expect(cb().config.mark).toBe('point');
|
||||
});
|
||||
});
|
||||
|
||||
describe('createSnippet', () => {
|
||||
test('builds a linked snippet, activates it, and resets the builder', () => {
|
||||
const id = seedDataset('Sales', [
|
||||
|
||||
Reference in New Issue
Block a user