MojoMojo Selenium Tests

UPDATE: All selenium.t tests pass with an updated mojomojo.yml file that adds authentication configurations1. In addition, I found the mojomojo.db database in t/app/ did not work. However,a copy of the mojomojo.db that gets created from the first time mojomojo_server.pl is run. does work.

The selenium tests have only proven successful under firefox-2-bin.

Here's a copy of the mojomojo.db that did work.

Test Results

As noted above these test results were before authentication was added to the test configuration, and the mojomojo.db was swapped out with on generated from mojomojo_server.pl (before spawn). When those changes, all these tests pass.

 perl -Ilib/ t/selenium.t
1..11
You can connect to your server at http://localhost:3000
ok 1 - open, /
ok 2 - is_text_present, Log in
ok 3 - click, link=Log in
ok 4 - wait_for_page_to_load, 30000, wait
ok 5 - type, loginField, admin
ok 6 - type, pass, admin
[error] Caught exception in MojoMojo::Controller::User->login 
"authenticate called with nonexistant realm: 'default'. 
at lib//MojoMojo/Controller/User.pm line 37"
ok 7 - click, //input[@value='log in']
ok 8 - wait_for_page_to_load, 30000
not ok 9 - is_text_present, admin
#   Failed test 'is_text_present, admin'
#   at t/selenium.t line 23.
not ok 10 - is_text_present, Log out
#   Failed test 'is_text_present, Log out'
#   at t/selenium.t line 24.
# Error requesting http://localhost:4444/selenium-server/driver/?cmd=click&1=link%3DLog%20out&sessionId=189709:
# ERROR: Element link=Log out not found
not ok 11 - click, link=Log out
#   Failed test 'click, link=Log out'
#   at t/selenium.t line 25.
# Looks like you failed 3 tests of 11.

1 The test configuration file: mojomojo.yml and the sqlite mojomojo database: mojomojo.db are found in the sub-diretory: t/app/

My tags:
 
Popular tags:
 
Powered by Catalyst