-
Notifications
You must be signed in to change notification settings - Fork 1.3k
test user data dir spec in CI on windows #1468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Greptile SummaryAdded Windows CI job to test
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Win as Windows Runner
participant PNPM as pnpm
participant Test as Playwright Test
participant V3 as V3 Instance
participant Chrome as Chrome Launcher
participant FS as File System
GH->>Win: Trigger run-windows-user-data-dir-test
Win->>Win: Checkout code
Win->>Win: Setup Node.js & pnpm
Win->>PNPM: pnpm install --frozen-lockfile
PNPM-->>Win: Dependencies installed
Win->>Test: Run user-data-dir.spec.ts
Test->>FS: Create temp dir (mkdtempSync)
FS-->>Test: testDir path
Test->>V3: Initialize with userDataDir config
V3->>Chrome: Launch with --user-data-dir flag
Chrome->>FS: Create profile directories
FS->>FS: Write "Default" folder
FS->>FS: Write "Local State" file
Test->>FS: Poll for "Default" directory
FS-->>Test: Directory exists
Test->>FS: Check "Local State" file
FS-->>Test: File exists
Test->>V3: close()
V3->>Chrome: Kill process
Test->>FS: rmSync(testDir)
FS-->>Test: Cleanup complete
Test-->>Win: Test passed/failed
Win-->>GH: Job complete (blocks other jobs)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/core/lib/v3/tests/user-data-dir.spec.ts">
<violation number="1" location="packages/core/lib/v3/tests/user-data-dir.spec.ts:46">
P2: The second file existence check should also use `expect.poll()` for consistency and to avoid flaky tests. If `Default` directory needs polling due to timing, `Local State` file likely does too.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| }) | ||
| .toBe(true); | ||
|
|
||
| expect(fs.existsSync(path.join(testDir, "Local State"))).toBe(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The second file existence check should also use expect.poll() for consistency and to avoid flaky tests. If Default directory needs polling due to timing, Local State file likely does too.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/lib/v3/tests/user-data-dir.spec.ts, line 46:
<comment>The second file existence check should also use `expect.poll()` for consistency and to avoid flaky tests. If `Default` directory needs polling due to timing, `Local State` file likely does too.</comment>
<file context>
@@ -0,0 +1,48 @@
+ })
+ .toBe(true);
+
+ expect(fs.existsSync(path.join(testDir, "Local State"))).toBe(true);
+ });
+});
</file context>
Summary by cubic
Run a Windows CI job to execute a Playwright test that verifies Chrome writes profile data to the provided userDataDir. This helps reproduce and diagnose Windows-specific issues in the V3 local browser launcher and gates later CI steps on this check.
Bug Fixes
Refactors
Written for commit c741e6e. Summary will update automatically on new commits.