Skip to content

Commit 1790254

Browse files
justin808claude
andcommitted
Update CHANGELOG with comprehensive migration guide
Added detailed migration instructions for: - Users currently using manual server management (old way) - Users migrating from cypress-rails gem The migration guide clearly shows the before/after comparison and provides step-by-step instructions for both scenarios. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2d6c2c8 commit 1790254

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,64 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2020
* **Environment configuration**: Support for `CYPRESS_RAILS_HOST` and `CYPRESS_RAILS_PORT` environment variables
2121
* **Automatic server management**: Test server automatically starts and stops with test execution
2222

23+
### Migration Guide
24+
25+
#### From Manual Server Management (Old Way)
26+
If you were previously running tests manually:
27+
28+
**Before (Manual Process):**
29+
```bash
30+
# Terminal 1: Start Rails server
31+
CYPRESS=1 bin/rails server -p 5017
32+
33+
# Terminal 2: Run tests
34+
yarn cypress open --project ./e2e
35+
# or
36+
npx cypress run --project ./e2e
37+
```
38+
39+
**After (Automated with Rake Tasks):**
40+
```bash
41+
# Single command - server managed automatically!
42+
bin/rails cypress:open
43+
# or
44+
bin/rails cypress:run
45+
```
46+
47+
#### From cypress-rails Gem
48+
If migrating from the `cypress-rails` gem:
49+
50+
1. Update your Gemfile:
51+
```ruby
52+
# Remove
53+
gem 'cypress-rails'
54+
55+
# Add
56+
gem 'cypress-on-rails', '~> 1.0'
57+
```
58+
59+
2. Run bundle and generator:
60+
```bash
61+
bundle install
62+
rails g cypress_on_rails:install
63+
```
64+
65+
3. Configure hooks in `config/initializers/cypress_on_rails.rb` (optional):
66+
```ruby
67+
CypressOnRails.configure do |c|
68+
# These hooks match cypress-rails functionality
69+
c.before_server_start = -> { DatabaseCleaner.clean }
70+
c.after_server_start = -> { Rails.application.load_seed }
71+
c.transactional_server = true
72+
end
73+
```
74+
75+
4. Use the same commands you're familiar with:
76+
```bash
77+
bin/rails cypress:open
78+
bin/rails cypress:run
79+
```
80+
2381
---
2482

2583
## [1.18.0] — 2025-08-27

0 commit comments

Comments
 (0)