[Jifty-commit] r3800 - in Test-WWW-Declare: doc
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Aug 6 12:21:38 EDT 2007
Author: sartak
Date: Mon Aug 6 12:21:37 2007
New Revision: 3800
Added:
Test-WWW-Declare/doc/
Test-WWW-Declare/doc/fancy-sessions.t
Modified:
Test-WWW-Declare/ (props changed)
Log:
r29939 at caladan: sartak | 2007-08-06 12:21:04 -0400
Add an example case of "fancy" sessons
Added: Test-WWW-Declare/doc/fancy-sessions.t
==============================================================================
--- (empty file)
+++ Test-WWW-Declare/doc/fancy-sessions.t Mon Aug 6 12:21:37 2007
@@ -0,0 +1,66 @@
+#!perl
+use BTDT::Test::WWW::Declare tests => 9;
+use strict;
+use warnings;
+
+session "gooduser" => run {
+ flow "create task" => check {
+ fill form 'tasklist-new_item_create' => {
+ summary => "bouncy task",
+ };
+ click button 'Create';
+ content should contain "bouncy task";
+ };
+
+ flow "assign task to otheruser" => check {
+ click href qr{bouncy task};
+ fill form mech->moniker_for("BTDT::Action::UpdateTask", id => 3) => {
+ owner_id => 'otheruser at example.com',
+ };
+ click button 'Save';
+
+ content should contain 'something or other';
+ };
+
+ session "otheruser" => run {
+ flow "accept gooduser's task" => check {
+ click href qr{unaccepted task(s)?};
+ content should contain 'bouncy task';
+ click href qr{bouncy task};
+
+ fill form mech->moniker_for('BTDT::Action::AcceptTask') => {
+ accepted => 1,
+ };
+ click button 'Save';
+
+ content should contain 'Task accepted';
+ };
+ };
+
+ flow "comment on the task I gave" => check {
+ click href qr{bouncy task};
+ content should contain 'bouncy task';
+
+ fill form mech->moniker_for('BTDT::Action::UpdateTask', id => 3) => {
+ comment => "first comment",
+ };
+
+ click button 'Save';
+
+ session "otheruser" => run {
+ flow "check that we got the comment" => check {
+ click href qr{bouncy task};
+ content should contain 'first comment';
+ };
+ };
+ };
+
+ flow "add another comment" => check {
+ fill form mech->moniker_for('BTDT::Action::UpdateTask', id => 3) => {
+ comment => "second comment",
+ };
+
+ click button 'Save';
+ };
+};
+
More information about the Jifty-commit
mailing list