view · edit · sidebar · attach · print · history

< Niklaus.20161206-davaz-rack | Index | Niklaus.20161130-cleanup_active_agents >>

20161205-consider-ut

Summary

  • When importing swissmedic active agent consider the ut (aka salts)
  • Make davaz.com running under Rack
  • Keep in Mind

Commits

Index

When importing swissmedic active agent consider the ut (aka salts)

In http://ch.oddb.org/de/gcc/show/reg/63043/seq/03/pack/005 we should get for the text "perindoprilum ut perindoprilum argininum 10 mg" the "Perindopril entspricht perindoprilum argininum 10 mg".

Checking how oddb2xml handles this situation. Find the following output

  <ARTICLE SHA256="fa881ecc2288ecf0395317920e893e276b7510b36f9a82d02e8593cebacfb4a6">
    <GTIN>7680630430014</GTIN>
    <NAME>Coveram plus 5/5/1.25mg, comprimé pelliculé</NAME>
<..>
        <SUBSTANCES>
          <SUBSTANCE>
            <SUBSTANCE_NAME>Perindoprilum</SUBSTANCE_NAME>
            <IS_ACTIVE_AGENT>true</IS_ACTIVE_AGENT>
            <SALTS>
              <SALT>
                <SUBSTANCE_NAME>Perindoprilum Argininum</SUBSTANCE_NAME>
                <QTY>5</QTY>
                <UNIT>mg</UNIT>
              </SALT>
            </SALTS>
          </SUBSTANCE>
<..>

Therefore we have the needed information. But we should some distinguish the chemical substanstace (aka. corresp) and the salts (which we found via "ut"), when displaying the results.

Zeno decided that we should keep this in mind, but not act on it today. Therefore added it to my keep in mind list.

Make davaz.com running under Rack

When running the tests the login does not work correctly. This must be fixed. When running the test the cuki_str does not contain :remember= after the login. Why? Maybe our stub for the YusServer ist not correkt. Comparing the stub with the YusServer I see that the YusServer returns a session, not a User. When running spec test for oddb.org I used the real Yus-Server. Can I improve the stub to make it pass correctly?

After a discussion with Zeno we decided that we will use also the Yus-Server of davaz.com (or its copy on oddb-ci2) to test and add the demo user there.

Reworked tests to use a common constant TEST_USER and TEST_PASSWORD when logging in. Setting it for the time being as the user I was able to login last week. After removeing completely the YusServer-Stub and changing in etc/config.yml.ci set YUS-Url to the same value as real server, I see in /service/davaz.com-yus/log/main/current the lines INFO -- Yus::Server: Authentication succeeded for juerg@davaz.com and DEBUG -- Yus::EntitySession: juerg@davaz.com allowed?(edit, com.davaz) returns true but the login does work correctly. Somehow the token generated in User.login_token does not get propagated correctly. Why?

Fixed this problem with a change in the method "call" of lib/sbsm/app.rb by setting @proy only if it not yet present (unless @proxy.is_a?(DRbObject)).

Now the login work, but after a logout the reached URL http://localhost:11090/en/admin/logout/fragment/111 only display a grey page. Why?

Clicking on the logout_link found via logout_link = browser.link(:name => 'logout') did produce the same error. Davaz.com uses partial views not found in oddb.org or other ywesee projects.

I also receive a blank screen after saving a new artwork. The setup for my unit tests is slow as for each test the rack and davaz server processes are restartet. This must be corrected some time.

But first looking at whether the other tests fail or work. The following failures are reported:

  • test/feature/drawings_test.rb:108:in `test_admin_drawings_removing_serie_success
  • test/feature/gallery_test.rb:31:in `test_gallery'
  • test/feature/guestbook_test.rb:88:in `test_guestbook_comment'
  • test/feature/inspiration_test.rb:20:in `test_tooltips_on_textblock' (This tests uses the unsupported function :mouseMoveTo)
  • test/feature/lectures_test.rb:37:in `test_lectures_tooltips'(This tests uses the unsupported function :mouseMoveTo)
  • TestMovies#test_login_then_logout [/home/niklaus/git/davaz.com/test/support/authentication.rb:32]:
  • TestMovies#test_admin_movies_update_description_text_by_wysiwyg_editor [test/feature/movies_test.rb:94]:
  • TestMovies#test_movies_pagination [test/feature/movies_test.rb:61]:
  • TestMovies#test_movies_show_a_thumbnail_of_its_movie [test/feature/movies_test.rb:48]
  • All test/feature/shop_test.rb:138:in `get_session_id' (setup error)
  • test/feature/work_test.rb:21:in `test_gallery' (This tests uses the unsupported function :mouseMoveTo)

Will start on correcting the work_test which uses mouseMoveTo, hoping that afterward more tests will pass, too.

These are the errors with Watir 5.0. I will try to update to the new Watir 6.0.x version which has wait_until for elements built-in. Updating to Watir 6.0, rewriting the wait_until and testing with the chromedriver made work_test.rb pass. Also setup/teardown times are much better! Changing all wait_until.

After adding the following snippet to the test_helper.rb

def wait_until( &block )
  (yield block).wait_until(&:present?)
end

the inspiration_test. passed. Same for lecture_test.rb and work_test.rb. The movie_tests contiue to fail. Same for some of the shop tests. But at least the different selected items show up.

Saving the current state.

view · edit · sidebar · attach · print · history
Page last modified on December 05, 2016, at 05:15 PM