view · edit · sidebar · attach · print · history

< Niklaus.20170315-davaz | Index | Niklaus.20170313-rapflag-with_change >>



  • After a login in we should edit immediately
  • Keep in Mind



After a login in we should edit immediately

On Travis-CI I get the following error

  1) Error:
Watir::Wait::TimeoutError: timed out after 5 seconds, waiting for true condition on {:class=>"intro-text", :tag_name=>"div"}
    /home/travis/build/ngiger/ `until'
    /home/travis/build/ngiger/ `wait_until'
    /home/travis/build/ngiger/ `wait_until'
    /home/travis/build/ngiger/ `test_tooltips_on_textblock'

When running it on my Debian system (Travis-CI uses ubuntu). I get

Selenium::WebDriver::Error::UnknownError: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9634.1","isDefault":true},"id":1,"name":"","origin":"://"}
  (Session info: chrome=54.0.2840.90)
  (Driver info: chromedriver=2.9.248304,platform=Linux 4.8.0-0.bpo.2-amd64 x86_64)
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/http/common.rb:81:in `new'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/http/common.rb:81:in `create_response'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/http/default.rb:86:in `request'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/bridge.rb:647:in `raw_execute'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/bridge.rb:625:in `execute'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/bridge.rb:121:in `get'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/common/navigation.rb:32:in `to'
    /home/niklaus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/watir-6.0.2/lib/watir/browser.rb:78:in `goto'
    /mnt/oddb-ci2/git/ `visit'
    test/feature/drawings_test.rb:11:in `setup'

Trying to run unit-test bundle exec ruby test/feature/drawings_test.rb with the last commit cd7a1637f39545f76eef68f371bc07666f85b078 before using SBSM without RackInterface. We are using now SBSM 1.3.3. But I still get the 3 errors like

  1) Failure:
TestDrawings#test_admin_drawings_removing_serie_failure [/home/niklaus/git/]:
Could not log in. Login-Field must no longer be present!

Debugging with pry showed, that when running the unit test we connect to the real YUS-Server on port 9997 with the test e-mail. This fails. We must therefore mock the yus-server correctly. May be we could use the MockPersistence from yus/test/helpers.rb.

I think I must explicly enable a possibility to override db_manager and yus_server when launching the davaz app. This would allow me to easily mock these two elements. This was not particulary difficult. But now test/feature/drawings_test.rb pass when I run in a separate screen bundle exec rake test, but it fails with error
TestDrawings#test_admin_drawings_canceling_of_add_new_serie [/home/niklaus/git/]:
Could not log in. Login-Field must no longer be present!

when run as bundle exec ruby test/feature/drawings_test.rb. Why?

After commit Added yus_server for test. Fixed test setup I still have 9 failing unit tests. But (at least) some guestbook test fail because I in december 2016 I added a commit Removed possibility to add guestbook to prevent SPAM without updating the corresponding unit tests.

Pushed Fixed gallery and guestbook tests and Removed reference to obsolete

Looking at whether we should skip the shop tests or make them pass. Pushed Allow running unit tests without an etc/config.yml. Less verbose

In test/support/authentication.rb I have a line skip "Somehow the login_link is still present", which highlights the problem we are chasing. After a login the state is not correctly update, only after going to another url.

Removed this line and running bundle exec ruby test/feature/login_out_test.rb fails as expected.

The state did not changed as it is marked as volatile. Why did Yasuhiro mark so many states as volatile? Adding more debug. Remarked that with my local copy of sbsm the viral states are correctly loaded when running

Will add tomorrow a test where two users login one after the other, as Zeno remarked, that it looks like under only one person can login successfully. Also I must add debug info about the login/logout of to track the problem.

view · edit · sidebar · attach · print · history
Page last modified on March 14, 2017, at 05:45 PM