Releases: codingsasi/ddev-playwright
Release v1.0.6 - Bug fixes, improvements
Fix issue with failing tests
Update docker image to use right dependencies to install the browsers
Update README and fix usage on using --ui mode outside ddev
Fix playwright config to work out of the box using ddev primary url env variable
Release v1.0.5 - Bug fixes, improvements
Full Changelog: v1.0.4...v1.0.5
Resolve Playwright addon test failures and installation issues
- Remove invalid --yes flag from npm init playwright command
- Fix npm ci fallback to use npm install when package-lock.json missing
- Fix bash syntax errors in YAML installation scripts (quote escaping)
- Add robust fallback initialization for Playwright projects
- Improve error handling in install-playwright command
- Ensure proper Node.js version usage in all commands
Fixes:
- "Unexpected token '.'" errors in install-playwright
- npm ci failures due to missing package-lock.json
- Bash syntax errors in post-install actions
- Playwright project initialization failures
All tests now pass successfully.
Release v1.0.4 - Bug fixes
Build web container with playwright, update readme
Release v1.0.1 - Bug fixes
Add flag to not overwrite existing playwright config when adding ddev addon
Release v1.0.0 - Initial Release 🎭
Based on the README and the addon's functionality, here are the release notes for the first release:
Release v1.0.0 - Initial Release 🎭
Overview
We're excited to announce the first release of ddev-playwright - a lightweight DDEV addon that provides a complete Playwright testing environment for your DDEV projects. This addon runs Playwright directly within the web container, making it simple and efficient for automated testing.
✨ Key Features
🚀 Easy Installation & Setup
- One-command installation:
ddev add-on get codingsasi/ddev-playwright - Automatic Node.js 20 installation via nvm
- Automated Playwright project initialization with TypeScript support
- Automatic browser and dependency installation
🎯 Lightweight Architecture
- Runs Playwright within the existing web container (no separate service needed)
- Minimal resource overhead
- Works with any DDEV project type (Drupal, WordPress, Laravel, etc.)
🔧 Smart Configuration
- Pre-configured to use
DDEV_PRIMARY_URLfor seamless test targeting - HTTPS support with
ignoreHTTPSErrors: truefor self-signed certificates - HTML report server exposed on port 9323
- TypeScript enforced by default for better code organization
🌐 Environment Detection
- Automatic detection of CI vs DDEV vs host environments
- Global setup and teardown hooks with environment-specific logic
- Graceful handling of Drupal and non-Drupal projects
📊 Built-in Reporting
- HTML reports accessible via DDEV project URL on port 9323
- Easy report viewing with
npx playwright show-report --host 0.0.0.0 --port 9323
🛠 Installation
ddev add-on get codingsasi/ddev-playwright
ddev restart📋 Post-Installation Setup
# Install Playwright dependencies and browsers
ddev playwright install-deps
ddev playwright install🎮 Usage
# Run all tests
ddev playwright test
# Run specific test file
ddev playwright test tests/example.spec.ts
# Show Playwright help
ddev playwright --help📁 What Gets Created
After installation, you'll find:
test/playwright/- Your Playwright test directoryplaywright.config.ts- Pre-configured for DDEV environmentglobal-setup.ts- Global test setup hooksglobal-teardown.ts- Global test cleanup hooksexample-test.spec.ts- Sample test checking homepage accessibility
🎭 Global Hooks
This addon includes sophisticated global setup and teardown functionality:
- Environment Detection: Automatically adapts to CI, DDEV container, or host environments
- Drupal Integration: Smart detection and optional drush command execution
- Flexible Configuration: Easy customization for your specific needs
🆚 Comparison with Other Solutions
This is a lightweight alternative to more heavyweight solutions like:
Advantages:
- Runs in web container (lower resource usage)
- Simpler setup and maintenance
- Works with any project type
Trade-offs:
- No built-in VNC for
--uimode (run UI mode from host instead) - Fewer advanced features
🧪 Testing
This addon includes a comprehensive test suite using Bats (Bash Automated Testing System) that validates:
- Installation from directory and release
- Automated setup completion
- Browser and dependency installation
- Test execution and HTML report accessibility
🤝 Contributing
We welcome contributions! Feel free to submit issues or pull requests.
👨💻 Maintainer
Contributed and maintained by [Abhai Sasidharan/codingsasi]
Full documentation: README.md
Get started today: ddev add-on get codingsasi/ddev-playwright