could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
---
We must show the interactions when creating a prescription.
I think it might be
Removing link to epha-interactions done in a separate commit. This was very easy.
Interactions begin to show up, but are all at the bottom and not after each medical.
Remarked that deleting does not work, as URL does not get updated! States like http://oddb-ci2.dyndns.org/de/gcc/ajax_delete_drug/state_id/70058044234220/ean/7680390530399 don't get interpreted correctly!
Interactions show up now correctly, but don't get correctly reset when changing prescription. Must rework handling drugs/ean13s between interaction_chooser and prescription.
I wonder whether the ajax-code is integrated correctly. If we want to follow the MVC paradigm, I would expect that calling http://oddb-ci2.dyndns.org/de/gcc/ajax_delete_drug/state_id/70045092509920/ean/7680390530474 will execute code under src/state and redisplay a correct URL.
Added in 10 minutes a Watir-Test to check for correct URL after deleting. Created in another 30 minutes a WatirTest for the prescription (adding two medis, deleting one). No test whether interactions appears or not. Remarked that a prescription can be created even when not logged in and maximum free tries have expired.
Replaced in interaction_chooser.rb link.onclick = "replace_element('drugs_#{model.barcode}', '#{url}');"
by link.onclick = "window.top.location.replace('#{url}');"
with url from home_interactions/ + all drugs. This works fine. The watir-tests for home_interactions pass now. But I had forgotten to test, that after deleting all items no medicament should show up, but there is an error, that it is still displayed, even when the URL does not show it.
No adding/deleting a medicament is reflected via the ean13 in the URL. But only the last ean is displayed inside the view. Must fix this tomorrow.
Problems to fix for tomorrow are:
See