[Jifty-commit] r4897 - in jifty/branches/jquery/t/TestApp-JiftyJS:
lib/TestApp/JiftyJS
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jan 21 09:50:56 EST 2008
Author: gugod
Date: Mon Jan 21 09:50:56 2008
New Revision: 4897
Modified:
jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm
jifty/branches/jquery/t/TestApp-JiftyJS/t/1-jifty-update.t
Log:
Add a with_time arg to "hello_world" template. If true, output current
timestamp, otherwise not.
Modified: jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm
==============================================================================
--- jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm (original)
+++ jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm Mon Jan 21 09:50:56 2008
@@ -72,7 +72,8 @@
};
template 'hello_world' => sub {
- p { "Time: " . time . ". Hello, " . ( get('name') || "World" ) };
+ p { (get('with_time') ? "Time: " . time . ". " : "")
+ . "Hello, " . ( get('name') || "World" ) };
};
template 'region1' => sub {
@@ -176,6 +177,7 @@
append => 'hello_world',
region => 'content',
args => {
+ with_time => 1,
name => "Append with effect $_"
},
effect => $_,
@@ -190,6 +192,7 @@
prepend => 'hello_world',
region => 'content',
args => {
+ with_time => 1,
name => "Prepend with effect $_"
},
effect => $_,
Modified: jifty/branches/jquery/t/TestApp-JiftyJS/t/1-jifty-update.t
==============================================================================
--- jifty/branches/jquery/t/TestApp-JiftyJS/t/1-jifty-update.t (original)
+++ jifty/branches/jquery/t/TestApp-JiftyJS/t/1-jifty-update.t Mon Jan 21 09:50:56 2008
@@ -37,6 +37,8 @@
$sel->click_ok("prepend-region");
$sel->wait_for_text_present_ok("Hello, World");
+ $sel->pause();
+
$src = $sel->get_html_source();
like $src, qr{<div id="region-content-content-.+">\n<p>Hello, World</p></div>\n<p>Hello, Smith</p><div id="region-content-content-.+">\n<p>Hello, World</p></div>};
@@ -64,4 +66,3 @@
$sel->stop;
-
More information about the Jifty-commit
mailing list