Commit ca2bf8a
John Pinto
Fix for failing Rubocop tests.
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 purpopses 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)1 parent 0f805f6 commit ca2bf8a
File tree
4 files changed
+32
-2
lines changed- config
- environments
- spec/features
- super_admins
- templates
4 files changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
| |||
0 commit comments