Skip to content

test: add component tests for showcase page and cards - #117

Merged
johnnyhuy merged 2 commits into
mainfrom
agent/issue-116-showcase-component-tests
Nov 9, 2026
Merged

johnnyhuy merged 2 commits into
mainfrom
agent/issue-116-showcase-component-tests

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Part of #86
Closes #116

What changed: the plugin showcase page and cards now have component tests. ShowcasePage.test.tsx covers the initial render with item counts and category chips, category chip filtering, search filtering and the empty state. ShowcaseCard.test.tsx covers name, description, category label, the recommended badge, tag truncation to four, and the deep link target and label. No production code changed and nothing user-facing changed. This is a test-only slice.

How it was verified:

  • mise run install - passed (Done with warnings in 2m 17s)
  • mise run lint - passed (packages/backend 1 file, permission module 3 files, theme 1 file, plausible 8 files, packages/app 48 files, no errors)
  • mise run test - passed: 5 suites passed, 1 skipped, 30 tests passed, 1 skipped. New tests: ShowcasePage renders every item with counts and chips, filters by category chip, filters by search term, shows the empty state. ShowcaseCard renders fields, shows the badge only when recommended, truncates tags to four, links the button to the template. Baseline on main was 22 passed, 1 skipped, so this adds 8 passing tests.
  • mise run dev - frontend on localhost:3000 returned 200 and the backend responded on localhost:7007. Signed in as guest, opened /showcase, and the live page showed 14 items available with chips All (14), Code Templates (7), GitHub (3), Answer Engine (2), Platform (2), matching the counts the new tests assert.
  • mise run build (Docker image) was not run. No backend code or packaging changed.

Proof:
Capture method (a) screenshot succeeded this run. Full page PNG of /showcase signed in as guest, saved at .tmp/proof/showcase-page.png on this branch: https://github.com/echohello-dev/backstage/blob/agent/issue-116-showcase-component-tests/.tmp/proof/showcase-page.png
Capture method (b) test output is pasted in the verification list above. The live snapshot from the same session listed Plugin Showcase, 14 items available and the first cards AI Hub Service and Answer Engine Worker with Recommended badges, matching the screenshot.

Known gaps and follow-ups:

@johnnyhuy
johnnyhuy merged commit 88a4726 into main Nov 9, 2026
5 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-116-showcase-component-tests branch November 9, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add component tests for the plugin showcase page and cards

1 participant