Better debug nuxt common bump#169
Conversation
📝 WalkthroughWalkthroughThis PR enhances E2E test failure diagnostics by adding screenshot capture on test failure. It updates a shared library version, implements Playwright page event listeners and Vitest failure hooks to capture full-page screenshots and browser output when tests fail, and updates ChangesE2E Test Failure Diagnostics
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
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 `@template/frontend/tests/setup/app.ts`:
- Around line 31-33: The screenshot file name uses only ctx.task.name (safeName)
which can collide; modify the screenshotPath creation used before
page.screenshot to append a unique suffix (for example ctx.task.id or a
timestamp/UUID) to safeName so filenames are unique; update the code that builds
screenshotPath (the variables safeName and screenshotPath and the
page.screenshot call) to include that unique suffix when generating the
`${safeName}.png` filename.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 9fcbb419-25e5-4af6-9064-36f06721228f
📒 Files selected for processing (3)
extensions/context.pytemplate/.gitignoretemplate/frontend/tests/setup/app.ts
Link to Issue or Message thread
Related to this https://github.com/lab-sync/copier-circuit-python-device-driver-frontend/pull/3
Why is this change necessary?
Need to have latest nuxt-common version downstream to fix issues with e2e tests.
How does this change address the issue?
While trying to figure out issues with e2e tests had to do some debugging. Backporting that into the template. Now it'll console log anything that the app logs to console or if there are page/request errors. And if the test fails it will take a screenshot and save it.
What side effects does this change have?
N/A
How is this change tested?
Downstream
Summary by CodeRabbit
Chores
Tests