Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/src/pages/Memories/Memories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { MemoriesPage } from '@/components/Memories';

const Memories = () => {
return <></>;
return <MemoriesPage />;
};

export default Memories;
4 changes: 2 additions & 2 deletions frontend/src/routes/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MyFav } from '@/pages/Home/MyFav';
import { AITagging } from '@/pages/AITagging/AITagging';
import { PersonImages } from '@/pages/PersonImages/PersonImages';
import { ComingSoon } from '@/pages/ComingSoon/ComingSoon';
import { MemoriesPage } from '@/components/Memories';
import Memories from '@/pages/Memories/Memories';
import { MemoryDetail } from '@/components/Memories/MemoryDetail';

export const AppRoutes: React.FC = () => {
Expand All @@ -23,7 +23,7 @@ export const AppRoutes: React.FC = () => {
<Route path={ROUTES.SETTINGS} element={<Settings />} />
<Route path={ROUTES.AI} element={<AITagging />} />
<Route path={ROUTES.ALBUMS} element={<ComingSoon />} />
<Route path={ROUTES.MEMORIES} element={<MemoriesPage />} />
<Route path={ROUTES.MEMORIES} element={<Memories />} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Scanning frontend tests for Memories route coverage via AppRoutes..."
fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -n -C3 'AppRoutes|ROUTES\.MEMORIES|/memories|MemoriesPage|@/pages/Memories/Memories|@/components/Memories'

Repository: AOSSIE-Org/PictoPy

Length of output: 386


🏁 Script executed:

fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -l 'Page rendering tests' \
  | head -5

Repository: AOSSIE-Org/PictoPy

Length of output: 108


🏁 Script executed:

# Once we find the file, let's read it to see the full test implementation
fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -l 'Page rendering tests' \
  | xargs head -100

Repository: AOSSIE-Org/PictoPy

Length of output: 1653


Add integration test for the Memories route through AppRoutes.

The existing allPages.test.tsx test only renders the Memories component directly with a smoke-test assertion ("renders without crashing"). This does not exercise the route through AppRoutes or verify real Memories UI behavior. Add an integration test that navigates to ROUTES.MEMORIES via AppRoutes and asserts expected Memories functionality.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/routes/AppRoutes.tsx` at line 26, Add an integration test in
allPages.test.tsx (or a new test file) that renders AppRoutes and navigates to
ROUTES.MEMORIES instead of mounting Memories directly: use a router helper
(e.g., MemoryRouter or createMemoryHistory + Router) and initialize it with the
path ROUTES.MEMORIES, render <AppRoutes /> and then assert real Memories UI
behavior (for example check for the Memories page heading, a specific button, or
that the memory list items appear) rather than just a smoke test; ensure the
test imports AppRoutes, ROUTES, and the same selectors/text used by the Memories
component to validate real routing and UI.

<Route path={ROUTES.MEMORY_DETAIL} element={<MemoryDetail />} />
<Route path={ROUTES.PERSON} element={<PersonImages />} />
</Route>
Expand Down
Loading