could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
---
First commite an improved test Added test with 4 medicament in rezept.
On oddb-ci2 we installed dojo-1.7.2. Same as on thinpower. The newest dojo version is 1.9.3 (Thu Feb 20 11:33:50 2014 -0800). (As seen on http://dojotoolkit.org/download/). A version 1.7.5 (of Fri Jun 14 18:18:44 2013 -0700) is available.
Dojo-Version on ch.oddb.org verified by openening a java script console with the following dialog
console.log(window.location); Location {replace: function, assign: function, ancestorOrigins: DOMStringList, origin: "http://ch.oddb.org", hash: ""…} VM648:2 undefined console.log(dojo.version.toString()); 1.7.2 (27913)
Installed dojo 1.7.5, stopped all services, stopped apache and brought the system up again. Now I get the following output
console.log(window.location); Location {replace: function, assign: function, ancestorOrigins: DOMStringList, origin: "http://oddb-ci2.dyndns.org", hash: ""…} VM421:2 console.log(dojo.version.toString()); 1.7.5 (4)
With dojo 1.7.5 I get the following results with
Now the same stuff with 1.9.3.
console.log(dojo.version.toString()); 1.9.3 (fd52c96) console.log(window.location); Location {replace: function, assign: function, ancestorOrigins: DOMStringList, origin: "http://oddb-ci2.dyndns.org", hash: ""…}
restart various stuff twice, till the version showed up!
With dojo 1.9.3 I get the following results with
There is no change between the results with 1.7.5 and 1.9.3. They perform both like 1.7.2.
Problems to fix for today are:
Header of interaction is no longer visible.
All medicaments get displayed.
But I have now the problem that I always see all interaction.
Fixed. Looks good now.
Now the rezept_spec works too. Adding another watir test for the instant search. Done.
The watirtests have sometimes error, because of a timeout when reading http://pagead2.googlesyndication.com/pagead/show_ads.js or
Watir::Exception::UnknownObjectException: unable to locate element, using {:name=>"search", :tag_name=>"button"} # ./spec/smoketest_spec.rb:69:in `block (3 levels) in <top (required)>'
Niklaus remarked a day later, that http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready might give you a clue.
Pushed commits
Problem is that I ran my tests only with firefox where as on chromium somehow the URL got extended by a '?', which made them fail.
Had to install the newest version of the chromedriver to make tests running with chromium. Now I am even able to run the tests for chromium and firefox in parallel on my desktop. Tests take about 3 minutes (+time for initial loading of oddb-ci2) to complete.
There are still the following regressions with the chromium.
Trying to fix them, too.
When looking at the output of bin/oddbd I see some curious output
error in SBSM::Session#process: /de/gcc/ajax_add_drug/state_id/70235241260880/ean/7680495260320 NoMethodError undefined method `request_path' for #<Hash:0x007fc1a5593648> /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:365:in `process' /var/www/oddb.org/src/util/session.rb:125:in `process' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:172:in `block in drb_process' <internal:prelude>:10:in `synchronize' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process' InteractionChooser ean13 req "/de/gcc/home_interactions/7680576730049?" error in SBSM::Session#process: /de/gcc/ajax_add_drug/state_id/70234794930000/ean/7680390530474 NoMethodError undefined method `request_path' for #<Hash:0x007fc1a5593648> /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:365:in `process' /var/www/oddb.org/src/util/session.rb:125:in `process' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:172:in `block in drb_process' <internal:prelude>:10:in `synchronize' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process' InteractionChooser ean13 req "/de/gcc/home_interactions/7680576730049?"
This error show up, when adding a second medicament to the interaction. It does not show up, when doing the same stuff with firefox.
When looking at the AJAX-console output for the browser I see the error msg
Uncaught TypeError: Cannot call method 'focus' of null;
There I find the code
function(ready, parser) {ready(function() {document.getElementById('interaction_searchbar').focus();
This error has gone with my patching src/view/interaction_chooser.rb. But I still see in the console the error
Uncaught TypeError: Cannot read property 'has' of undefined
inside the dojo.js. I suppose that chrome is running a newer version of ajax and our version of the dojo-toolkit does produce this error.
I will push the current state, as it is better for Rezept and at least using the direct URL like example work.
Pushed:
Pushed the changes to thinpower. Restarted ch.oddb and when doing some manual tests with chromium, found out that I could add two medicals to a rezept, but not three.
Pushed commit Remove unnessary interaction heading. Fix alignment of comment.