Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(routes): delete the redirect suite that proved nothing

obchain59af2e9ea86d
diff --git a/app/src/AppRoutes.connections-flows.test.tsx b/app/src/AppRoutes.connections-flows.test.tsx
index 73b4f96c41..3d6c6298e8 100644
--- a/app/src/AppRoutes.connections-flows.test.tsx
+++ b/app/src/AppRoutes.connections-flows.test.tsx
@@ -2,18 +2,16 @@
* Route-table coverage for the connections / channels / flows / automation
* surfaces.
*
- * WHY THIS FILE EXISTS, given `pages/__tests__/Connections.redirects.test.tsx`
- * already claims to cover two of these redirects:
- *
- * That file declares its **own** local `<TestRoutes>` copy of three routes and
- * renders that, so it asserts React Router's `<Navigate>` works rather than
- * asserting anything about this app's route table. Deleting `/skills` from
- * `AppRoutes.tsx` leaves it green. It also never inspects the landing URL,
- * which is the entire payload of the `/channels` redirect.
- *
* This file mounts the REAL `AppRoutes` (same mocking pattern as
* `AppRoutes.auth.test.tsx`) and asserts the landing `pathname + search`, so a
* change to the route table is what makes it fail.
+ *
+ * It replaced a suite that declared its own local `<TestRoutes>` copy of three
+ * routes and rendered that, which asserted React Router's `<Navigate>` works
+ * rather than anything about this app's table: deleting `/skills` or
+ * `/channels` from `AppRoutes.tsx` left it green (#5915). Assert against the
+ * real table, and assert the landing URL rather than only that a page
+ * rendered — the URL is the entire payload of the `/channels` redirect.
*/
import { render, screen } from '@testing-library/react';
import type React from 'react';
@@ -103,9 +101,8 @@ describe('connections / channels back-compat redirects (real route table)', () =
it('/channels lands on /connections?tab=messaging, preserving the tab selector', () => {
// The whole point of this redirect: `/channels` was an orphaned standalone
// page, and the messaging tab of Connections replaced it. Landing on bare
- // `/connections` would drop the user on the Welcome tab instead — which is
- // exactly what `Connections.redirects.test.tsx` cannot distinguish, because
- // it only asserts that the page rendered.
+ // `/connections` would drop the user on the Welcome tab instead — which a
+ // test that only asserts the page rendered cannot distinguish.
const at = renderAt('/channels');
expect(at.href()).toBe('/connections?tab=messaging');
expect(at.page()).toBe('connections');
diff --git a/app/src/pages/__tests__/Connections.redirects.test.tsx b/app/src/pages/__tests__/Connections.redirects.test.tsx
deleted file mode 100644
index afa5a81514..0000000000
--- a/app/src/pages/__tests__/Connections.redirects.test.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Phase 2 — route redirect tests.
- *
- * Verifies that:
- * /skills → /connections (back-compat redirect)
- * /channels → /connections?tab=messaging (orphaned page redirect)
- *
- * We render a minimal route tree so we do not need the full provider tree.
- */
-import { render, screen } from '@testing-library/react';
-import { MemoryRouter, Navigate, Route, Routes } from 'react-router-dom';
-import { describe, expect, it } from 'vitest';
-
-/**
- * Minimal route tree that mirrors only the redirects under test.
- * Using `Navigate` directly avoids needing to mock the full app.
- */
-function TestRoutes() {
- return (
- <Routes>
- <Route path="/connections" element={<div data-testid="connections-page">connections</div>} />
- <Route path="/skills" element={<Navigate to="/connections" replace />} />
- <Route path="/channels" element={<Navigate to="/connections?tab=messaging" replace />} />
- </Routes>
- );
-}
-
-const renderAt = (path: string) =>
- render(
- <MemoryRouter initialEntries={[path]}>
- <TestRoutes />
- </MemoryRouter>
- );
-
-describe('Phase 2 route redirects', () => {
- it('/skills redirects to /connections', () => {
- renderAt('/skills');
- expect(screen.getByTestId('connections-page')).toBeInTheDocument();
- });
-
- it('/channels redirects to /connections (Messaging tab)', () => {
- renderAt('/channels');
- expect(screen.getByTestId('connections-page')).toBeInTheDocument();
- });
-
- it('/connections renders the connections page directly', () => {
- renderAt('/connections');
- expect(screen.getByTestId('connections-page')).toBeInTheDocument();
- });
-});