Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds Playwright end-to-end tests and supporting infrastructure to packages/uniwind: Playwright config, global setup that compiles CSS and bundles a browser IIFE, tests and TypeScript globals, package/CI updates, .gitignore entries, and a Jest mapping removal. Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CI Job
participant Playwright as Playwright Runner
participant GlobalSetup as global-setup
participant FS as File System (.generated/)
participant Browser as Chromium Browser
CI->>Playwright: run `test:e2e`
Playwright->>GlobalSetup: invoke globalSetup()
GlobalSetup->>FS: ensure .generated/ exists
GlobalSetup->>FS: write compiled CSS (uniwind.css)
GlobalSetup->>FS: write bundled IIFE (getWebStyles.iife.js)
Playwright->>Browser: launch browser and load test page
Playwright->>Browser: inject compiled CSS and bundle
Browser->>Browser: expose window.__uniwind (getWebStyles/getWebVariable)
Playwright->>Browser: execute tests (getWebStyles assertions)
Browser-->>Playwright: return test results
Playwright-->>CI: report pass/fail
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/uniwind/tests/e2e/global-setup.ts`:
- Line 1: The e2e setup imports and uses esbuild (import { build } from
'esbuild' and await build(...)) but esbuild is not declared in the uniwind
package's devDependencies; add "esbuild" to the uniwind package.json
devDependencies (with a suitable version range) so the import resolves in
isolated installs and CI.
- Line 9: ROOT is currently derived from resolve(process.cwd()), which makes it
depend on where the test runner was invoked; change it to resolve the test
file's directory instead so ROOT is independent of invocation cwd. Replace the
use of process.cwd() when computing ROOT with a directory computed from the
module/file location (e.g., using __dirname in CommonJS or
path.dirname(fileURLToPath(import.meta.url)) in ESM) so the symbol ROOT is
anchored to the global-setup.ts file location rather than the process working
directory.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d4ff9a26-cb1b-41de-b75f-883875e32f95
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
packages/uniwind/.gitignorepackages/uniwind/jest.config.web.jspackages/uniwind/package.jsonpackages/uniwind/playwright.config.tspackages/uniwind/tests/e2e/getWebStyles.test.tspackages/uniwind/tests/e2e/global-setup.tspackages/uniwind/tests/e2e/window.d.tsturbo.json
💤 Files with no reviewable changes (1)
- packages/uniwind/jest.config.web.js
|
🚀 This pull request is included in v1.6.0. See Release v1.6.0 for release notes. |
Summary by CodeRabbit
Tests
Chores