Creating a (failing) watir test took only 5 minutes. Now trying to make it pass. First try did not work, will continue tomorrow.
Looking at the spec directory I found a not yet checked in rss_spec.rb. Made it pass (execpt for fachinfo) with the firefox browser. RSS don't open directly under chrome.
We remarked that the RSS feed for fachinfo is very big (currently 26MB) and has entries dating back to 2006. Therefore Zeno and me decided to add a TODO item that RSS-Feeds should always be limited to something like one year (or starting with first january of last year) and each year should be reachable via link specifying its year, e.g. http://ch.oddb.org/de/gcc/rss/channel/fachinfo-2013.rss. This would be generated automatically at the end of each year. Pushed commit Added watir test for RSS-feed (firefox) and Made rss-test pass with firefox by increasing the timeout
Instead of going to home a click on the 'home' snapback when display a fachinfo goes to the changes. Okay. I must invest some more hours to test the snapback-links thoroughly via watir tests.
I remarked that in /de/gcc/show/fachinfo/40501/diff/28.11.2015 the link "Änderungen" pointed to /de/gcc/home/fachinfo/reg/40501/diff, but as we are not consistent the correct link must be /de/gcc/show/fachinfo/40501/diff.
My watir tests don't work at the moment because in de/gcc/show/fachinfo/63184/diff the steps don't have the expected call 'th-pointersteps'. Why? Fixed the problem. Improved the watir tests and pushed commits Fix wrong link for fachinfo changes and Fix another wrong link for fachinfo changes
When using the search types Price comparision, interaction, active agent or trademark a search for Warfarin display "No result found", which is correct as it not a registered drug in Switzerland. Using the combined search (Price comparision and components) however results in "Your search string produces a very large search result. Please specify your search.". This must be corrected.
Added a watir test. But for http://oddb-ci2.dyndns.org/ it does not show any problem. Running the test with base-URL http://ch.oddb.org. Here I found errors. The log of the watir tests are
niklaus@oddb-ci2 /m/oddb.org> bundle exec rspec spec/searchbar_spec.rb:281 Run options: include {:locations=>{"./spec/searchbar_spec.rb"=>[281]}} Took 3 seconds for for http://oddb-ci2.dyndns.org to be ready. First answer was after 0 seconds. URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_interaction?#best_result .URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_sequence?#best_result .URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_oddb?#best_result .URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_substance?#best_result .URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_combined?#best_result . Finished in 31.3 seconds (files took 2.43 seconds to load) 5 examples, 0 failures niklaus@oddb-ci2 /m/oddb.org> set -x ODDB_URL http://ch.oddb.org niklaus@oddb-ci2 /m/oddb.org> bundle exec rspec spec/searchbar_spec.rb:281 Run options: include {:locations=>{"./spec/searchbar_spec.rb"=>[281]}} Took 3 seconds for for http://ch.oddb.org to be ready. First answer was after 0 seconds. URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_interaction?#best_result FURL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_sequence?#best_result .URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_oddb?#best_result FURL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_substance?#best_result .URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_combined?#best_result F Failures: 1) ch.oddb.org Interaktion should display not found for Warfarin which is not registered in Switzerland Failure/Error: expect(text).to match LeeresResult expected "Deutsch | English | Fran?ais - CHF | EUR | USD\nAnalysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL , 2015 ywesee.com, Commit-ID\nEinstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home" to match /hat ein leeres Resultat/ Diff: @@ -1,2 +1,7 @@ -/hat ein leeres Resultat/ +Deutsch | English | Fran?ais - CHF | EUR | USD +Analysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi. +Es ist ein Fehler aufgetreten: +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche. +LGPL , 2015 ywesee.com, Commit-ID +Einstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>' 2) ch.oddb.org Preisvergleich should display not found for Warfarin which is not registered in Switzerland Failure/Error: expect(text).to match LeeresResult expected "Deutsch | English | Fran?ais - CHF | EUR | USD\nAnalysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL , 2015 ywesee.com, Commit-ID\nEinstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home" to match /hat ein leeres Resultat/ Diff: @@ -1,2 +1,7 @@ -/hat ein leeres Resultat/ +Deutsch | English | Fran?ais - CHF | EUR | USD +Analysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi. +Es ist ein Fehler aufgetreten: +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche. +LGPL , 2015 ywesee.com, Commit-ID +Einstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>' 3) ch.oddb.org Preisvergleich und Inhaltsstoff should display not found for Warfarin which is not registered in Switzerland Failure/Error: expect(text).to match LeeresResult expected "Deutsch | English | Fran?ais - CHF | EUR | USD\nAnalysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL , 2015 ywesee.com, Commit-ID\nEinstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home" to match /hat ein leeres Resultat/ Diff: @@ -1,2 +1,7 @@ -/hat ein leeres Resultat/ +Deutsch | English | Fran?ais - CHF | EUR | USD +Analysen | Apotheken | Arzt | Interaktionen | Medikamente | MiGeL | Services | Spital | Zulassungsi. +Es ist ein Fehler aufgetreten: +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche. +LGPL , 2015 ywesee.com, Commit-ID +Einstellungen | Hilfe | FAQ | Anmeldung | Kontakt | Home # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>' Finished in 2 minutes 47.6 seconds (files took 2.34 seconds to load) 5 examples, 3 failures Failed examples: rspec ./spec/searchbar_spec.rb[1:26] # ch.oddb.org Interaktion should display not found for Warfarin which is not registered in Switzerland rspec ./spec/searchbar_spec.rb[1:28] # ch.oddb.org Preisvergleich should display not found for Warfarin which is not registered in Switzerland rspec ./spec/searchbar_spec.rb[1:30] # ch.oddb.org Preisvergleich und Inhaltsstoff should display not found for Warfarin which is not registered in Switzerland
Also running on oddb-ci2 via bin/admin search_combined('Warfarin', 'de')
returns #<ODDB::SearchResult:0x000000055d4a80>
whereas on thinpower it results in ODBA::OdbaResultLimitError
. I suspect that indices are no longer correct on thinpower. I will dump and load its database on oddb-ci2 to see whether I have then the same error. But this did not produce any error. Therefore I think the indices were newly generated when being imported. I propose to run jobs/rebuild_indices on thinpower and test afterwards again. Committed Added Tests for snapback and Warfarin
Zeno restarted rebuild_indices. Must add jobs/rebuild_indices to weekly running cron jobs. Add the line 1 19 * * 6 apache cd /var/www/oddb.org && /usr/local/bin/ruby jobs/rebuild_indices >/dev/null 2>&1
to let it run each Saturday at 7 PM. Must check next Sunday whether I got also line like the followin in /var/log/messages Nov 30 11:49:03 thinpower sudo: ywesee : TTY=pts/8 ; PWD=/var/www/oddb.org ; USER=apache ; COMMAND=jobs/rebuild_indices