Comments (6)
To add to the above, here's how we're using headless Chrome with Jasmine.
# Gemfile
group :development, :test do
gem "jasmine"
gem "jasmine_selenium_runner", require: false
end
# spec/javascripts/support/jasmine_helper.rb
require "jasmine/runners/selenium"
Jasmine.configure do |config|
config.runner = lambda { |formatter, jasmine_server_url|
options = Selenium::WebDriver::Chrome::Options.new
options.headless!
webdriver = Selenium::WebDriver.for(:chrome, options: options)
Jasmine::Runners::Selenium.new(formatter, jasmine_server_url, webdriver, 50)
}
end
The jasmine_selenium_runner
gem doesn't support headless chrome out of the box.
from jasmine-gem.
Is chrome headless supported in the end, or not?
from jasmine-gem.
The original selenium functionality never really disappeared, just pulled out of this repo. Take a look at jasmine_selenium_runner for real browser support. This gives users who are fine with PhantomJS and don't want the Selenium overhead the option, while still allowing users who want a real browser that option.
Hope this helps. Thanks for using Jasmine!
from jasmine-gem.
Chrome headless is supported via the jasmine selenium runner gem. I don't think we have great docs for how to use the headless part of chrome with the selenium runner, but I would be happy to review a pull request there to update the readme with steps to configure the browser.
Hope this helps. Thanks for using Jasmine!
from jasmine-gem.
But be sure to keep PhantomJS support as an option, in case people have to run tests on platforms where GTK3 isn't supported, so they can't run headless Chrome/Firefox. (Yes, I'm aware that having to run tests on a platform that old is its own problem, but it happens.)
from jasmine-gem.
Thanks so much for the headless chrome example. Super helpful!
from jasmine-gem.
Related Issues (20)
- Make "Spec List" default HOT 1
- jasmine:ci keeps waiting for jasmine server to start with Puma 3.7 HOT 5
- Jasmine:ci rake task doesn't work with PhantomJS 2.1.1 (via NPM) HOT 1
- Can you specify individual sources files to be used in individual spec files? HOT 1
- `rake jasmine` doesn't play well with Passenger + Rails 5 HOT 4
- localhost hardcoded in base.rb HOT 5
- jsx trouble HOT 1
- jasmine:ci hangs after running examples HOT 6
- set seed via configuration HOT 2
- CSS file found instead of JS file HOT 1
- Use proxy for rails server HOT 1
- Assets fail to be included for Rails 3.2.22 using genrators HOT 2
- How to use it with IstanbulJS ? HOT 1
- After updating jasmine from jasmine 2.4.0 to jasmine 3.3.0 I am getting some error HOT 2
- Chrome headless, TypeError: Converting circular structure to JSON HOT 3
- 3.4.0 - random ignored for jasmine:server HOT 6
- Chrome headless backend not documented
- Jasmine unable to work with rails 6 HOT 11
- Chrome on Arch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasmine-gem.