refactor(test): use captureScreenshot helper from @screenly/edge-apps - #34
Open
nicomiguelino wants to merge 2 commits into
Open
refactor(test): use captureScreenshot helper from @screenly/edge-apps#34nicomiguelino wants to merge 2 commits into
nicomiguelino wants to merge 2 commits into
Conversation
- 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.
Contributor
There was a problem hiding this comment.
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.tsto delegate screenshot setup/navigation/capture tocaptureScreenshot, keeping the RSS route mock viasetupMocks. - Pin
@screenly/edge-appsto26.8.0and 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 on lines
+69
to
+72
| width, | ||
| height, | ||
| filenamePrefix: 'rss-reader-app', | ||
| screenlyJsContent, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e2e/screenshots.spec.tsto use the newcaptureScreenshot(browser, options)helper from@screenly/edge-apps/test/screenshotsinstead of the manually duplicated Playwright context/page/mock/screenshot boilerplate. The RSS feed route mock (no dedicatedsetup*Mockshelper exists for it) is passed inline via thesetupMockscallback.@screenly/edge-appsto26.8.0inpackage.json.screenshots/output for review.