Skip to content

Commit

Permalink
Document how to force real browser on feature test (#11417)
Browse files Browse the repository at this point in the history
changelog: Internal, Automated Testing, Improve documentation


Co-authored-by: Andrew Duthie <1779930+aduth@users.noreply.github.com>
  • Loading branch information
2 people authored and MrNagoo committed Oct 29, 2024
1 parent a318a1a commit 910f806
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ test:
$ SHOW_BROWSER=true bundle exec rspec spec/features/
```

> [!TIP]
> Only JavaScript-enabled tests are configured to run using a real browser, since browser tests are slow to run. If you have a feature test you want to run in a real browser, you can add the `js` metadata to your test to mark it as requiring JavaScript:
> ```rb
> it 'does something', :js doend
> ```
#### Skipping asset compilation in feature tests
To ensure that tests are run using the latest source code, JavaScript-enabled feature specs will
Expand Down

0 comments on commit 910f806

Please sign in to comment.