diff options
author | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
commit | 0fb307c305e4bc2c9c27dc25a3308beae3a4d33c (patch) | |
tree | 9d527e17db4b4d875f63f019dcd513762bb938a6 /rt/t/web/ticket_seen.t | |
parent | 6a79fae0c14b6635c67b4f224ee4a14f263b37d0 (diff) | |
parent | fc6209f398899f0211cfcedeb81a3cd65e04a941 (diff) |
This commit was generated by cvs2svn to compensate for changes in r10640,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/t/web/ticket_seen.t')
-rw-r--r-- | rt/t/web/ticket_seen.t | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/rt/t/web/ticket_seen.t b/rt/t/web/ticket_seen.t index 00b2632d8..3a77a5899 100644 --- a/rt/t/web/ticket_seen.t +++ b/rt/t/web/ticket_seen.t @@ -3,7 +3,7 @@ use strict; use warnings; -use RT::Test tests => 16; +use RT::Test tests => 21; my $queue = RT::Test->load_or_create_queue( Name => 'Regression' ); ok $queue && $queue->id, 'loaded or created queue'; @@ -52,6 +52,14 @@ diag "user B adds a message, we check that user A see notification and can clear my ($status, $msg) = $ticket->Correspond( Content => 'bla-bla' ); ok $status, 'added reply' or diag "error: $msg"; + my $txns = $ticket->Transactions; + $txns->Limit( + FIELD => 'Type', + VALUE => "Correspond", + ); + my $txn = $txns->Last; + my $reply_id = $txn->id; + ok( $reply_id, 'got correspond txn id' ); $agent_a->goto_ticket($tid); $agent_a->content_like(qr/bla-bla/ims, 'the message on the page'); @@ -61,11 +69,23 @@ diag "user B adds a message, we check that user A see notification and can clear 'we have not seen something' ); + $agent_a->follow_link_ok( + { text => 'jump to the first unread message' }, + 'try to jump to first unread message' + ); + like( $agent_a->base, qr/#txn-$reply_id$/, 'contains anchor' ); + $agent_a->follow_link_ok({text => 'jump to the first unread message and mark all messages as seen'}, 'try to mark all as seen'); $agent_a->content_like( qr/Marked all messages as seen/ims, 'see success message' ); + like( $agent_a->base, qr/#txn-$reply_id$/, 'contains anchor' ); + + $agent_a->content_like( + qr/Marked all messages as seen/ims, + 'see success message' + ); $agent_a->goto_ticket($tid); $agent_a->content_unlike( @@ -74,7 +94,3 @@ diag "user B adds a message, we check that user A see notification and can clear ); } - - - - |