-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - To deal with missing favicon.ico error ( ActionController::RoutingError: No route matches [GET] "/favicon.ico") : added config/routes_test.rb to add a route will return an empty response with a 200 OK status code when the browser requests the favicon.ico file. Then for test purposes we add the lines to config/encvironments/test.rb: # Add config/routes_test.rb to routes config.paths['config/routes.rb'] << Rails.root.join('config/routes_test.rb') - The other outstanding errors arose because in the test environment we sometimes encounter errors like (Selenium::WebDriver::Error::ElementClickInterceptedError: element click intercepted: # Element <input type="submit" name="commit" value="Change affiliation" class="btn btn-secondary" data-disable-with="Change affiliation"> # is not clickable at point (101, 203). Other element would receive the click: <div id="ui-id-2" tabindex="-1" class="ui-menu-item-wrapper">...</div>). To get round this we use JS to click on element using code like this: change_affiliation_input_button = find('input[value="Change affiliation"]') execute_script('arguments[0].click();', change_affiliation_input_button)
- Loading branch information
John Pinto
committed
Apr 9, 2024
1 parent
0f805f6
commit 55321d0
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
Rails.application.routes.draw do | ||
# Define your test-specific routes here | ||
|
||
# This route will return an empty response with a 200 OK status code | ||
# when the browser requests the favicon.ico file. | ||
get '/favicon.ico', to: proc { |_env| [200, {}, ['']] } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters