@
Add star-map Angular app, ETL pipeline, and caveman plugin Angular 3D star map (galaxy/system/body views, Three.js rendering, navigation store) plus the NASA ETL tooling that builds the star, exoplanet and solar-system datasets, Playwright e2e suite, and the cs:caveman Claude Code plugin (command, agent, skill). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> @
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { describe, beforeEach, expect, it } from 'vitest';
|
||||
|
||||
import { NavigationStore } from './navigation.store';
|
||||
|
||||
describe('NavigationStore', () => {
|
||||
let store: NavigationStore;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
store = TestBed.inject(NavigationStore);
|
||||
});
|
||||
|
||||
it('starts at the galaxy view with nothing selected', () => {
|
||||
expect(store.viewLevel()).toBe('galaxy');
|
||||
expect(store.selectedStarId()).toBeNull();
|
||||
expect(store.selectedBodyId()).toBeNull();
|
||||
});
|
||||
|
||||
it('selectStar updates selectedStarId', () => {
|
||||
store.selectStar(42);
|
||||
|
||||
expect(store.selectedStarId()).toBe(42);
|
||||
});
|
||||
|
||||
it('selectBody updates selectedBodyId', () => {
|
||||
store.selectBody('mars');
|
||||
|
||||
expect(store.selectedBodyId()).toBe('mars');
|
||||
});
|
||||
|
||||
it('setViewLevel switches between galaxy and system', () => {
|
||||
store.setViewLevel('system');
|
||||
|
||||
expect(store.viewLevel()).toBe('system');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user