[Rt-commit] r16535 - in rt/branches/3.999-DANGEROUS: t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Oct 24 23:33:26 EDT 2008
Author: sunnavy
Date: Fri Oct 24 23:33:25 2008
New Revision: 16535
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t
Log:
r17391 at sunnavys-mb: sunnavy | 2008-10-25 11:31:48 +0800
cf is rendered by action
Modified: rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t Fri Oct 24 23:33:25 2008
@@ -10,6 +10,7 @@
ok $m->login, 'logged in as root';
my $cf_name = 'test select one value';
+my $cf_moniker = 'edit-ticket-cfs';
my $cfid;
diag "Create a CF" if $ENV{'TEST_VERBOSE'};
@@ -94,12 +95,12 @@
$m->title_like(qr/Modify ticket/i, 'modify ticket');
$m->content_like(qr/\Q$cf_name/, 'CF on the page');
- my $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ my $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is lc $value, 'asd', 'correct value is selected';
$m->submit;
$m->content_unlike(qr/\Q$cf_name\E.*?changed/mi, 'field is not changed');
- $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is lc $value, 'asd', 'the same value is still selected';
my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
$ticket->load( $tid );
@@ -116,14 +117,14 @@
$m->title_like(qr/Modify ticket/i, 'modify ticket');
$m->content_like(qr/\Q$cf_name/, 'CF on the page');
- my $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ my $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is lc $value, 'asd', 'correct value is selected';
- $m->select("object-RT::Model::Ticket-$tid-CustomField-$cfid-values" => 0 );
+ $m->select("J:A:F-$cfid-$cf_moniker" => 0 );
$m->submit;
$m->content_like(qr/\Q$cf_name\E.*?changed/mi, 'field is changed');
$m->content_unlike(qr/0 is no longer a value for custom field/mi, 'no bad message in results');
- $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is lc $value, '0', 'new value is selected';
my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
@@ -141,13 +142,13 @@
$m->title_like(qr/Modify ticket/i, 'modify ticket');
$m->content_like(qr/\Q$cf_name/, 'CF on the page');
- my $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ my $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is lc $value, '0', 'correct value is selected';
- $m->select("object-RT::Model::Ticket-$tid-CustomField-$cfid-values" => '' );
+ $m->select("J:A:F-$cfid-$cf_moniker" => '' );
$m->submit;
$m->content_like(qr/0 is no longer a value for custom field/mi, '0 is no longer a value');
- $value = $m->form_number(3)->value("object-RT::Model::Ticket-$tid-CustomField-$cfid-values");
+ $value = $m->form_number(3)->value("J:A:F-$cfid-$cf_moniker");
is $value, '', '(no value) is selected';
my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
More information about the Rt-commit
mailing list