[Rt-commit] rt branch, 4.0/preserve-time-units, updated. rt-4.0.1-219-g79ef57d
Jason May
jasonmay at bestpractical.com
Wed Nov 2 18:57:41 EDT 2011
The branch, 4.0/preserve-time-units has been updated
via 79ef57d084bb84483b5edae327075e02489d9085 (commit)
from f8c79b93207c932040882e53adc0db1e6874a9a4 (commit)
Summary of changes:
t/web/{ticket_modify_all.t => ticket_basics.t} | 18 +---------
t/web/ticket_modify_all.t | 44 +----------------------
2 files changed, 4 insertions(+), 58 deletions(-)
copy t/web/{ticket_modify_all.t => ticket_basics.t} (75%)
- Log -----------------------------------------------------------------
commit 79ef57d084bb84483b5edae327075e02489d9085
Author: Jason May <jasonmay at bestpractical.com>
Date: Wed Nov 2 18:59:23 2011 -0400
Move time unit tests out of jumbo tests and into ticket basics
These tests have nothing to do with modifying basics on Jumbo, so they
belong elsewhere.
diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_basics.t
similarity index 75%
copy from t/web/ticket_modify_all.t
copy to t/web/ticket_basics.t
index 41030b1..ebd06d5 100644
--- a/t/web/ticket_modify_all.t
+++ b/t/web/ticket_basics.t
@@ -1,30 +1,16 @@
use strict;
use warnings;
-use RT::Test tests => 19;
+use RT::Test tests => 14;
my $ticket = RT::Test->create_ticket(
- Subject => 'test bulk update',
+ Subject => 'test ticket basics',
Queue => 1,
);
my ( $url, $m ) = RT::Test->started_ok;
ok( $m->login, 'logged in' );
-$m->get_ok( $url . "/Ticket/ModifyAll.html?id=" . $ticket->id );
-
-$m->submit_form(
- form_number => 3,
- fields => { 'UpdateContent' => 'this is update content' },
- button => 'SubmitTicket',
-);
-
-$m->content_contains("Message recorded", 'updated ticket');
-$m->content_lacks("this is update content", 'textarea is clear');
-
-$m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
-$m->content_contains("this is update content", 'updated content in display page');
-
# Failing test where the time units are not preserved when you
# click 'Add more files' on Display
for (qw/Estimated Worked Left/) {
diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_modify_all.t
index 41030b1..6412c4f 100644
--- a/t/web/ticket_modify_all.t
+++ b/t/web/ticket_modify_all.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 19;
+use RT::Test tests => 12;
my $ticket = RT::Test->create_ticket(
Subject => 'test bulk update',
@@ -25,44 +25,4 @@ $m->content_lacks("this is update content", 'textarea is clear');
$m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
$m->content_contains("this is update content", 'updated content in display page');
-# Failing test where the time units are not preserved when you
-# click 'Add more files' on Display
-for (qw/Estimated Worked Left/) {
- $m->goto_create_ticket(1);
- $m->form_name('TicketCreate');
- $m->field("Time${_}" => "1");
- $m->select("Time${_}-TimeUnits" => 'hours');
- $m->click('AddMoreAttach');
- $m->form_name('TicketCreate');
- is($m->value("Time${_}-TimeUnits"), 'hours', 'time units stayed to "hours" after the form was submitted');
-}
-
-$m->goto_update_ticket(ticket => $ticket, action => 'Respond');
-$m->form_name('TicketUpdate');
-$m->select("UpdateTimeWorked-TimeUnits" => 'hours');
-$m->click('AddMoreAttach');
-$m->form_name('TicketUpdate');
-is($m->value("UpdateTimeWorked-TimeUnits"), 'hours', 'time units stayed to "hours" after the form was submitted');
-
-my $cf = RT::Test->load_or_create_custom_field(
- Name => 'CF1',
- Type => 'Freeform',
- Pattern => '.', # mandatory
- Queue => 'General',
-);
-
-# More time unit testing by a failing CF validation
-$m->get_ok($url.'/Admin/CustomFields/Objects.html?id='.$cf->id);
-$m->form_name('CustomFieldAppliesTo');
-$m->tick('AddCustomField-'.$cf->id => '0'); # Make CF global
-$m->click('UpdateObjs');
-$m->text_contains('Object created', 'CF applied globally');
-
-$m->goto_create_ticket(1);
-
-$m->form_name('TicketCreate');
-$m->field('TimeWorked-TimeUnits' => 'hours');
-$m->click('SubmitTicket');
-
-$m->form_name('TicketCreate');
-is($m->value("TimeWorked-TimeUnits"), 'hours', 'time units stayed to "hours" after the form was submitted');
+# XXX TODO test other parts, i.e. basic, dates, people and links
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list