[Jifty-commit] r5151 - in jifty/branches/jquery/t/TestApp-Plugin-SinglePage: t

Jifty commits jifty-commit at lists.jifty.org
Wed Feb 20 19:17:02 EST 2008


Author: gugod
Date: Wed Feb 20 19:17:01 2008
New Revision: 5151

Added:
   jifty/branches/jquery/t/TestApp-Plugin-SinglePage/t/history.t
Modified:
   jifty/branches/jquery/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm

Log:
Add a test to test browser's back button.


Modified: jifty/branches/jquery/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm
==============================================================================
--- jifty/branches/jquery/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm	(original)
+++ jifty/branches/jquery/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm	Wed Feb 20 19:17:01 2008
@@ -49,5 +49,18 @@
     h1 { $foo };
 };
 
+template '/p/history/one' => page {
+    p { "This Is Page One" };
+};
+
+template '/p/history/two' => page {
+    p { "This Is Page Two" };
+};
+
+
+template '/p/history/three' => page {
+    p { "This Is Page Three" };
+};
+
 1;
 

Added: jifty/branches/jquery/t/TestApp-Plugin-SinglePage/t/history.t
==============================================================================
--- (empty file)
+++ jifty/branches/jquery/t/TestApp-Plugin-SinglePage/t/history.t	Wed Feb 20 19:17:01 2008
@@ -0,0 +1,28 @@
+use strict;
+use warnings;
+use lib 't/lib';
+use Jifty::SubTest;
+use Jifty::Test tests => 10;
+use Jifty::Test::WWW::Selenium;
+use utf8;
+
+my $server  = Jifty::Test->make_server;
+my $sel = Jifty::Test::WWW::Selenium->rc_ok( $server );
+my $URL = $server->started_ok;
+diag $URL;
+
+$sel->open_ok("/p/history/one");
+$sel->wait_for_text_present_ok("This Is Page One");
+
+$sel->open_ok("/p/history/two");
+$sel->wait_for_text_present_ok("This Is Page Two");
+
+$sel->open_ok("/p/history/three");
+$sel->wait_for_text_present_ok("This Is Page Three");
+
+$sel->go_back();
+$sel->wait_for_text_present_ok("This Is Page Two");
+
+$sel->go_back();
+$sel->wait_for_text_present_ok("This Is Page One");
+


More information about the Jifty-commit mailing list