You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can’t get the integration test introduced in Adding Integration Tests to work without modification.
This is the error message reported:
Failures:
1) Books list page
Failure/Error: raise ActionController::RoutingError, "No route matches [#{env[ 'REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
ActionController::RoutingError:
No route matches [GET] "/ember-cli-live-reload.js"
[…]
# --- Caused by: ---
# Capybara::ExpectationNotMet:
# expected to find text "Books" in "Loading..."
[…]
Before:
# spec/features/books_spec.rb
require 'rails_helper'
feature 'Books', js: true do
scenario 'list page' do
visit '/'
expect(page).to have_content('Books')
end
end
And here’s the spec after I modified it:
require 'rails_helper'
Capybara.raise_server_errors = false
feature 'Book', js: true do
scenario 'list page' do
visit '/'
sleep 5.second # !important
expect(page).to have_content('Book')
end
end
If I leave out the Capybara.raise_server_errors = false, then the RoutingErrors still appear. If I leave out the sleep 5.second, then the browser window pops open and closes before the page has loaded.
The text was updated successfully, but these errors were encountered:
Hmm, I don't like that you have to have a sleep. You shouldn't have to do that. What if you kill the line in index.html that contains ember-cli-live-reload.js?
I don't know. The ember-cli-live-reload.js thing goes away in Angular CLI 1.0.0-beta.11-webpack.8 anyway, so it will become a non-issue soon. (I'm currently working on updating the book for that CLI version, by the way, which uses Angular 2.0.0RC5.)
I can’t get the integration test introduced in Adding Integration Tests to work without modification.
This is the error message reported:
Before:
And here’s the spec after I modified it:
If I leave out the
Capybara.raise_server_errors = false
, then the RoutingErrors still appear. If I leave out thesleep 5.second
, then the browser window pops open and closes before the page has loaded.The text was updated successfully, but these errors were encountered: