mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Theme Builder: Layout/Axes/Legend/Type panels, scheme-render fix, fail-loud gallery
This commit is contained in:
@@ -170,25 +170,26 @@ describe('ColorControls', () => {
|
||||
expect(tableau.querySelectorAll('span span').length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test('picking a scheme writes range.category as a string', () => {
|
||||
test('picking a scheme writes range.category as a Vega scheme object', () => {
|
||||
render();
|
||||
open({});
|
||||
|
||||
act(() => picker('Categorical color scheme')!.click());
|
||||
act(() => button('Category 10')!.click());
|
||||
|
||||
expect(range().category).toBe('category10');
|
||||
// The `{ scheme }` object — a bare scheme-name string is rejected at render.
|
||||
expect(range().category).toEqual({ scheme: 'category10' });
|
||||
});
|
||||
|
||||
test('a sequential pick sets both heatmap and ramp', () => {
|
||||
test('a sequential pick sets both heatmap and ramp to the scheme object', () => {
|
||||
render();
|
||||
open({});
|
||||
|
||||
act(() => picker('Sequential color scheme')!.click());
|
||||
act(() => button('Viridis')!.click());
|
||||
|
||||
expect(range().heatmap).toBe('viridis');
|
||||
expect(range().ramp).toBe('viridis');
|
||||
expect(range().heatmap).toEqual({ scheme: 'viridis' });
|
||||
expect(range().ramp).toEqual({ scheme: 'viridis' });
|
||||
});
|
||||
|
||||
test('invalid JSON disables the controls', () => {
|
||||
|
||||
Reference in New Issue
Block a user