[Jifty-commit] r5080 - jifty/branches/jquery/t/TestApp-JiftyJS/t

Jifty commits jifty-commit at lists.jifty.org
Fri Feb 8 15:10:22 EST 2008


Author: gugod
Date: Fri Feb  8 15:09:40 2008
New Revision: 5080

Modified:
   jifty/branches/jquery/t/TestApp-JiftyJS/t/2-behaviour.t

Log:
Somehow IE can't load the Test Harness page properly.  So I use
selenium to go over those test pages and wait for proper amount of
"ok" showing up.


Modified: jifty/branches/jquery/t/TestApp-JiftyJS/t/2-behaviour.t
==============================================================================
--- jifty/branches/jquery/t/TestApp-JiftyJS/t/2-behaviour.t	(original)
+++ jifty/branches/jquery/t/TestApp-JiftyJS/t/2-behaviour.t	Fri Feb  8 15:09:40 2008
@@ -4,7 +4,7 @@
 use warnings;
 use lib 't/lib';
 use Jifty::SubTest;
-use Jifty::Test tests => 4;
+use Jifty::Test qw(no_plan);
 use Jifty::Test::WWW::Selenium;
 use utf8;
 
@@ -12,8 +12,16 @@
 my $sel    = Jifty::Test::WWW::Selenium->rc_ok($server);
 my $URL    = $server->started_ok;
 
-$sel->open_ok("/static/js-test/index.html");
+for my $test_file (qw(01.behaviour.html 02.action.html)) {
+    $sel->open_ok("/static/js-test/$test_file");
+    my $html = $sel->get_text("test");
+    $html =~ /(\d+)\.\.(\d+)/;
+
+    for($1..$2) {
+        $sel->wait_for_text_present("exact:ok $_");
+        ok(! $sel->is_text_present("exact:nok $_") );
+    }
+}
 
-$sel->wait_for_text_present_ok("All tests successful.");
 $sel->stop;
 


More information about the Jifty-commit mailing list