Skip to content

refactor(test): use captureScreenshot helper from @screenly/edge-apps - #34

Open
nicomiguelino wants to merge 2 commits into
developmentfrom
feat/use-capture-screenshot-helper
Open

refactor(test): use captureScreenshot helper from @screenly/edge-apps#34
nicomiguelino wants to merge 2 commits into
developmentfrom
feat/use-capture-screenshot-helper

Conversation

@nicomiguelino

@nicomiguelino nicomiguelino commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refactors e2e/screenshots.spec.ts to use the new captureScreenshot(browser, options) helper from @screenly/edge-apps/test/screenshots instead of the manually duplicated Playwright context/page/mock/screenshot boilerplate. The RSS feed route mock (no dedicated setup*Mocks helper exists for it) is passed inline via the setupMocks callback.
  • Pins @screenly/edge-apps to 26.8.0 in package.json.
  • Adds the regenerated screenshots/ output for review.

- Replace the manual Playwright context/page/mock/screenshot
  boilerplate with the new captureScreenshot helper
- Pin @screenly/edge-apps to 26.8.0

Draft: depends on Screenly/edge-apps-library#78 being merged and
released as 26.8.0 first.
@screenly/edge-apps 26.8.0 is now published on npm, so bun.lock can
resolve it from the registry instead of the local tarball path used
while this PR was in draft.
@nicomiguelino
nicomiguelino marked this pull request as ready for review September 1, 2026 20:34
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:34

Copilot AI 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.

Pull request overview

This PR refactors the Playwright E2E screenshot test to use the shared captureScreenshot(browser, options) helper from @screenly/edge-apps/test/screenshots, pins @screenly/edge-apps to 26.8.0, and updates the generated screenshot artifacts accordingly.

Changes:

  • Refactor e2e/screenshots.spec.ts to delegate screenshot setup/navigation/capture to captureScreenshot, keeping the RSS route mock via setupMocks.
  • Pin @screenly/edge-apps to 26.8.0 and update the Bun lockfile to match.
  • Regenerate committed screenshot outputs under screenshots/.

Reviewed changes

Copilot reviewed 2 out of 13 changed files in this pull request and generated 1 comment.

File Description
package.json Pins @screenly/edge-apps to 26.8.0 to align with the new test helper usage.
bun.lock Updates the lockfile to reflect the pinned @screenly/edge-apps version and resulting dependency graph changes.
e2e/screenshots.spec.ts Replaces duplicated Playwright boilerplate with captureScreenshot and inlines the RSS feed route mock via setupMocks.
screenshots/* Updated generated screenshot artifacts for visual review.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/screenshots.spec.ts
Comment on lines +69 to +72
width,
height,
filenamePrefix: 'rss-reader-app',
screenlyJsContent,
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