Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix flaky manuscript redirect test: await effect-driven aria-current

[._.]/ Adam Eivy840e5b33cf77
diff --git a/client/src/pages/PipelineManuscriptEditor.test.jsx b/client/src/pages/PipelineManuscriptEditor.test.jsx
index ff0d4afa4d..748252f61f 100644
--- a/client/src/pages/PipelineManuscriptEditor.test.jsx
+++ b/client/src/pages/PipelineManuscriptEditor.test.jsx
@@ -163,8 +163,12 @@ describe('PipelineManuscriptEditor', () => {
await screen.findByText('My Series');
// The single issue (number 1) renders; the canonical issue tab is current.
expect(await screen.findByDisplayValue('The hero walked in. She left.')).toBeInTheDocument();
- const tab = within(screen.getByRole('navigation', { name: 'Issues' })).getByRole('link');
- expect(tab).toHaveAttribute('aria-current', 'page');
+ // The bare→/1 redirect is an effect-driven navigate, so the tab's
+ // aria-current lands a tick after the textarea content paints. Wait for it.
+ await waitFor(() => {
+ const tab = within(screen.getByRole('navigation', { name: 'Issues' })).getByRole('link');
+ expect(tab).toHaveAttribute('aria-current', 'page');
+ });
});
it('switches issues via the tabs without refetching the manuscript', async () => {