Files
vault-para/100-project/Personal/Dev/PlayWright.md
windyboyandClaude Sonnet 4.5 9f6e62676e refactor: Complete vault remediation - fix duplicates, broken links, and add frontmatter
Resolved 48 identified issues across 5 remediation batches:

Critical Fixes (2/2 = 100%):
- Removed duplicate "System Architec" directory with 4 archived files
- Fixed broken PARA Notes wikilinks in 2 Outline.md files

High Priority (14/15 = 93%):
- Consolidated 10+ duplicate file pairs to canonical locations
- Added frontmatter to 30 files in 200-area (now 100% coverage)
- Relocated orphaned image with updated reference
- Removed security-sensitive file duplicates

Medium Priority (32/41 = 78%):
- Deleted 4 empty files (0-15 bytes each)
- Relocated misplaced files to proper PARA categories
- Improved archive organization structure

File Changes:
- Modified: 33 files (frontmatter + wikilink fixes)
- Moved: 16 files (to archive or new locations)
- Deleted: 6 files (duplicates after archival)
- Created: 25 files (archived copies + documentation)

Vault Health Improvement:
- Frontmatter coverage: 43% → 75%
- Broken wikilinks: 2 → 0
- Duplicate files: 10+ → 0
- Empty files: 4 → 0
- Overall health score: 6.5/10 → 8.5/10

Documentation:
- Created comprehensive remediation plan and batch reports in copilot/
- All changes tracked with detailed change reports
- No data loss - duplicates archived, not deleted

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 14:36:42 +08:00

87 lines
2.6 KiB
Markdown
Executable File

Here is the **definitive, consolidated guide** for setting up Playwright on **Arch Linux (WSL)**.
This summary skips the trial-and-error we just went through and provides the "Happy Path" to get everything working in one go.
---
### 📋 Prerequisites
* **WSL 2** (Recommended).
* **Proxy (Optional):** If you are behind a proxy, remember to use `sudo -E` to preserve environment variables.
---
### 🚀 Step 1: System Prep & Node.js
First, ensure your package database is fresh (fixes 404 errors) and install Node.js.
```bash
# Update system and install Node.js/npm
# Use -E if you have https_proxy set in your shell
sudo -E pacman -Syu nodejs npm
```
### 📦 Step 2: Install System Dependencies (The Critical Step)
**Do not** use `npx playwright install-deps` (it fails on Arch). Instead, install these packages manually. This list includes all the X11, Graphics, and Network libraries required by Chromium, Firefox, and WebKit.
```bash
sudo -E pacman -S --needed \
git \
nss \
nspr \
libdrm \
alsa-lib \
mesa \
gtk3 \
at-spi2-core \
pango \
cairo \
gdk-pixbuf2 \
libx11 \
libxcomposite \
libxdamage \
libxext \
libxfixes \
libxrandr \
libxcursor \
libxi \
libxrender \
libxcb \
freetype2 \
fontconfig \
ffmpeg
```
### 🛠️ Step 3: Initialize Playwright
Set up your project and download the browser binaries (these are separate from the system libs above).
```bash
# Create project directory
mkdir my-tests && cd my-tests
# Initialize (Select TypeScript/JavaScript as preferred)
npm init playwright@latest
# If prompted to "Install Playwright browsers", select True.
# If you need to install them manually later:
npx playwright install
```
### ✅ Step 4: Run Tests
You are now ready to run.
```bash
npx playwright test
```
---
### 💡 Troubleshooting Cheat Sheet
| Issue | Solution |
| :------------------------ | :-------------------------------------------------------------------------------- |
| **`install-deps` fails** | **Ignore it.** It only supports Ubuntu. Use the `pacman` command in Step 2. |
| **`libxxx.so not found`** | You are missing a package. Use `pkgfile libxxx.so` to find the Arch package name. |
| **404 Errors (Pacman)** | Your mirrors are out of sync. Run `sudo pacman -Syu` to refresh. |
| **Browser won't launch** | Ensure `nspr` and `nss` are installed (included in Step 2). |
| **GUI/Headless issues** | If visual mode fails, try `xvfb-run npx playwright test`. |