Skip to content

test: add e2e test for /package-code/ route - #3122

Merged
ghostdevv merged 6 commits into
npmx-dev:mainfrom
gameroman:e2e-package-code-tests
Aug 3, 2026
Merged

test: add e2e test for /package-code/ route#3122
ghostdevv merged 6 commits into
npmx-dev:mainfrom
gameroman:e2e-package-code-tests

Conversation

@gameroman

@gameroman gameroman commented Aug 3, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

This should hopefully catch the #3112 regression

🧭 Context

📚 Description

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview Aug 3, 2026 11:22am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Aug 3, 2026 11:22am
npmx-lunaria Ignored Ignored Aug 3, 2026 11:22am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Expanded browser coverage for the Package Code Viewer, verifying that empathic version 2.0.0 loads and displays the expected package details.
    • Extended hydration checks to include the empathic 2.0.0 package page, helping ensure consistent behaviour across supported scenarios.

Walkthrough

The pull request adds the empathic version 2.0.0 route to hydration coverage and adds an end-to-end test for its package heading, version, and package.json links.

Changes

Package Code E2E coverage

Layer / File(s) Summary
Package Code Viewer validation
test/e2e/hydration.spec.ts, test/e2e/package-code.spec.ts
The hydration test matrix now includes /package-code/empathic/v/2.0.0. A Playwright test verifies the package heading, version, and package.json links in the sidebar and directory listing.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the added end-to-end test for the /package-code/ route.
Description check ✅ Passed The description links the change to regression #3112, which matches the added end-to-end test coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/package-code.spec.ts`:
- Around line 10-11: Update the version assertion in the package-code test to
scope the locator to the version selector, using the visible data-testid symbols
package-subheader or version-selector-button instead of the page-wide text
locator. Preserve the check that version 2.0.0 is visible within that scoped
selector.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7023d22a-c955-4df7-a40c-6dcacc6a9e96

📥 Commits

Reviewing files that changed from the base of the PR and between ac8e171 and 55a2ff4.

📒 Files selected for processing (2)
  • test/e2e/hydration.spec.ts
  • test/e2e/package-code.spec.ts

Comment thread test/e2e/package-code.spec.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/package-code.spec.ts`:
- Line 15: Update the codePage locator in the package-code test to pass the CSS
ID selector directly, removing the backticks from the selector string so it
targets `#code-page-container`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d85b911f-0b63-43d6-888f-01404ecb9478

📥 Commits

Reviewing files that changed from the base of the PR and between 55a2ff4 and c392b31.

📒 Files selected for processing (1)
  • test/e2e/package-code.spec.ts

Comment thread test/e2e/package-code.spec.ts Outdated
Comment thread test/e2e/package-code.spec.ts
@ghostdevv ghostdevv changed the title chore: add e2e test for /package-code/ route test: add e2e test for /package-code/ route Aug 3, 2026
@ghostdevv
ghostdevv added this pull request to the merge queue Aug 3, 2026
Merged via the queue into npmx-dev:main with commit c9efdaa Aug 3, 2026
25 checks passed
@gameroman
gameroman deleted the e2e-package-code-tests branch August 3, 2026 18:48
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.

2 participants