import { test } from 'magnitude-test'; test('Galaxy page renders correctly', async (agent) => { await agent.act('Navigate to /galaxy'); await agent.check('The text "Calculate My Graph" is visible on the screen'); await agent.check('The page displays a dark background (the 3D canvas area)'); }); test('[Happy Path] User can navigate to galaxy from chat', async (agent) => { await agent.act('Navigate to /chat'); // In the future, there should be a navigation link to /galaxy // For now, we just verify direct navigation works await agent.act('Navigate to /galaxy'); await agent.check('The page URL contains "/galaxy"'); await agent.check('The text "Calculate My Graph" is visible on the screen'); }); test('[Happy Path] Calculate Graph button shows loading state', async (agent) => { await agent.act('Navigate to /galaxy'); await agent.act('Click the "Calculate My Graph" button'); // The button should show a loading state while processing // Note: This may be very fast if there are no nodes or few nodes await agent.check('The "Calculate My Graph" button is in a loading state or has completed'); }); test('[Unhappy Path] Calculate Graph with no nodes shows appropriate feedback', async (agent) => { // This test verifies the button completes without errors await agent.act('Navigate to /galaxy'); await agent.check('The text "Calculate My Graph" is visible on the screen'); await agent.act('Click the "Calculate My Graph" button'); // The button should complete (with or without auth, it handles the request) await agent.check('The "Calculate My Graph" button is visible and clickable'); });