projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT 4.0.13
[freeside.git]
/
rt
/
t
/
customfields
/
sort_order.t
diff --git
a/rt/t/customfields/sort_order.t
b/rt/t/customfields/sort_order.t
index
c5c808c
..
ba0b654
100644
(file)
--- a/
rt/t/customfields/sort_order.t
+++ b/
rt/t/customfields/sort_order.t
@@
-1,9
+1,8
@@
-#!/usr/bin/perl -w
use strict;
use warnings;
use strict;
use warnings;
-use RT::Test tests =>
18
;
+use RT::Test tests =>
20
;
use RT::Ticket;
use RT::CustomField;
use RT::Ticket;
use RT::CustomField;
@@
-11,10
+10,10
@@
my $queue_name = "CFSortQueue-$$";
my $queue = RT::Test->load_or_create_queue( Name => $queue_name );
ok($queue && $queue->id, "$queue_name - test queue creation");
my $queue = RT::Test->load_or_create_queue( Name => $queue_name );
ok($queue && $queue->id, "$queue_name - test queue creation");
-diag "create multiple CFs: B, A and C"
if $ENV{TEST_VERBOSE}
;
+diag "create multiple CFs: B, A and C";
my @cfs = ();
{
my @cfs = ();
{
- my $cf = RT::CustomField->new(
$RT::
SystemUser );
+ my $cf = RT::CustomField->new(
RT->
SystemUser );
my ($ret, $msg) = $cf->Create(
Name => "CF B",
Queue => $queue->id,
my ($ret, $msg) = $cf->Create(
Name => "CF B",
Queue => $queue->id,
@@
-24,7
+23,7
@@
my @cfs = ();
push @cfs, $cf;
}
{
push @cfs, $cf;
}
{
- my $cf = RT::CustomField->new(
$RT::
SystemUser );
+ my $cf = RT::CustomField->new(
RT->
SystemUser );
my ($ret, $msg) = $cf->Create(
Name => "CF A",
Queue => $queue->id,
my ($ret, $msg) = $cf->Create(
Name => "CF A",
Queue => $queue->id,
@@
-34,7
+33,7
@@
my @cfs = ();
push @cfs, $cf;
}
{
push @cfs, $cf;
}
{
- my $cf = RT::CustomField->new(
$RT::
SystemUser );
+ my $cf = RT::CustomField->new(
RT->
SystemUser );
my ($ret, $msg) = $cf->Create(
Name => "CF C",
Queue => $queue->id,
my ($ret, $msg) = $cf->Create(
Name => "CF C",
Queue => $queue->id,
@@
-47,12
+46,11
@@
my @cfs = ();
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login( root => 'password' ), 'logged in';
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login( root => 'password' ), 'logged in';
-diag "reorder CFs: C, A and B"
if $ENV{TEST_VERBOSE}
;
+diag "reorder CFs: C, A and B";
{
$m->get( '/Admin/Queues/' );
$m->follow_link_ok( {text => $queue->id} );
{
$m->get( '/Admin/Queues/' );
$m->follow_link_ok( {text => $queue->id} );
- $m->follow_link_ok( {text => 'Ticket Custom Fields'} );
-
+ $m->follow_link_ok( {id => 'page-ticket-custom-fields'} );
my @tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF B', 'CF A', 'CF C']);
my @tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF B', 'CF A', 'CF C']);
@@
-64,7
+62,7
@@
diag "reorder CFs: C, A and B" if $ENV{TEST_VERBOSE};
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
}
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
}
-diag "check ticket create, display and edit pages"
if $ENV{TEST_VERBOSE}
;
+diag "check ticket create, display and edit pages";
{
$m->submit_form(
form_name => "CreateTicketInQueue",
{
$m->submit_form(
form_name => "CreateTicketInQueue",
@@
-83,8
+81,7
@@
diag "check ticket create, display and edit pages" if $ENV{TEST_VERBOSE};
@tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
@tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
-
- $m->follow_link_ok( {text => 'Custom Fields'} );
+ $m->follow_link_ok( {id => 'page-basics'});
@tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
@tmp = ($m->content =~ /(CF [ABC])/g);
is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);