---
Continue work of last week.
Zeno remarked that after having visited a prescription then printing a fachinfo does not work anymore. Added a watir test for this situation via commit Added watir test for printing a FI from a prescription and going back
With my local changes, it does indeed print a fachinfo, but the watir test is wrong as the text start also with "Ausdruck von http://www.oddb.org\nFachinformation\nLosartan
Pushed commit Use View::PublicTemplate instead of HtmlGrid::DivTemplate for printing a prescription
It seems that sometimes the comments still get messed up, as I get sometime an error when running the watir tests twice. Improved the watir tests to add a timestamp value into the comment and now I get errors like
expected: "Kommentar 20140722091614 Losartan" got: "Kommentar 20140722091557 Losartan" (using ==)
Must fix this error. Fixed watir test with commit Corrected watir tests for prescription comments. No idea for the moment on howto fix the problem.
Zeno specified that after clicking on the print the browser must open a new window. In the watir tests, we did not care about and adapted dynamically whether a new window opened or not. Therefore it was easy to add tests for these two case by adding a line @browser.windows.size.should == oldWindowsSize + 1 # must open a new window
Reverted src/view/printtemplate to derive from HtmlGrid::DivTemplate. Adding dojo support separately. Also I think that it did not open a new window inside the prescription. Is a matter of calling window.open and not window.replace in the print.onclick. But why did this affect also printing the fachinfo?
Made test/test_view/printtemplate.rb and test/test_view/publictemplate.rb running as standalone.
Now the remarks (if present) show up on print/rezept. The interactions show up too, but the header for the interactions not. Fixed this problem, but now my watir for these fields fail when run the first time, but work when run a second time.
Things look now okay. See .
Pushing commit Corrections to printtemplate. Must open a seperate window when printing.