[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-981-g5fe3f6f
Jesse Vincent
jesse at bestpractical.com
Tue Dec 21 15:31:23 EST 2010
The branch, 3.9-trunk has been updated
via 5fe3f6f8cff781ee4d7ded6c05e69a31311f0458 (commit)
from e84ec1c2327fada4098f6a69cd1492d7ac0e8198 (commit)
Summary of changes:
share/html/Elements/ShowUserVerbose | 13 ++-----------
share/html/Elements/Tabs | 2 +-
t/web/dashboards-basics.t | 2 +-
t/web/dashboards-groups.t | 6 +++---
t/web/dashboards-permissions.t | 2 +-
t/web/walk.t | 4 ++--
6 files changed, 10 insertions(+), 19 deletions(-)
- Log -----------------------------------------------------------------
commit 5fe3f6f8cff781ee4d7ded6c05e69a31311f0458
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Tue Dec 21 15:31:11 2010 -0500
update tests to keep pace with dashboards menu updates
diff --git a/share/html/Elements/ShowUserVerbose b/share/html/Elements/ShowUserVerbose
index c8902b0..e867c7c 100644
--- a/share/html/Elements/ShowUserVerbose
+++ b/share/html/Elements/ShowUserVerbose
@@ -54,21 +54,12 @@ my $comment = '';
if ($User) {
$address = $User->EmailAddress;
- $phrase = $User->RealName
- if $User->RealName && lc $User->RealName ne lc $address;
+ $phrase = $User->RealName if $User->RealName && lc $User->RealName ne lc $address;
$comment = $User->Name if lc $User->Name ne lc $address;
- $comment = "($comment)" if defined $comment and length $comment;
- $Address = Email::Address->new( $phrase, $address, $comment );
}
-$Address->comment('') if $comment and defined $Address->user and lc $Address->user eq lc $comment;
-if ( $phrase and my ( $l, $r ) = ( $phrase =~ /^(\w+) (\w+)$/ ) ) {
- $Address->phrase('')
- if $Address->user =~ /^\Q$l\E.\Q$r\E$/
- || $Address->user =~ /^\Q$r\E.\Q$l\E$/;
-}
+my $display = ($phrase || $comment || '' ) . ($address ? ' <'.$address.'>' : '');
-my $display = $Address->format;
$display = $m->interp->apply_escapes( $display, 'h' )
unless $ARGS{'NoEscape'};
</%INIT>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index a40d8ed..2dcad5e 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -83,7 +83,7 @@ my $build_main_nav = sub {
}
my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
if ( $dashboard->CurrentUserCanCreateAny ) {
- $dashes->child( loc('New Dashboard...') => path => "/Dashboards/Modify.html?Create=1" );
+ $dashes->child('dashboard_create' => title => loc('New Dashboard...') => path => "/Dashboards/Modify.html?Create=1" );
}
my $tickets = Menu->child( search => title => loc('Tickets'), path => '/Search/Build.html' );
diff --git a/t/web/dashboards-basics.t b/t/web/dashboards-basics.t
index 362cbd0..3e29463 100644
--- a/t/web/dashboards-basics.t
+++ b/t/web/dashboards-basics.t
@@ -63,7 +63,7 @@ $m->content_contains("Create");
$m->get_ok($url."Dashboards/index.html");
$m->content_contains("New", "'New' link because we now have ModifyOwnDashboard");
-$m->follow_link_ok({ id => 'tools-dashboards-create'});
+$m->follow_link_ok({ id => 'home-dashboard_create'});
$m->form_name('ModifyDashboard');
$m->field("Name" => 'different dashboard');
$m->content_lacks('Delete', "Delete button hidden because we are creating");
diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 0899c5b..f424d68 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -54,14 +54,14 @@ ok($inner_group->HasMemberRecursively($user_obj->PrincipalId), "inner has user r
ok $m->login(customer => 'customer'), "logged in";
-$m->follow_link_ok({ id => 'tools-dashboards-create'});
+$m->follow_link_ok({ id => 'home-dashboard_create'});
$m->form_name('ModifyDashboard');
is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
$m->content_lacks('Delete', "Delete button hidden because we are creating");
$user_obj->PrincipalObj->GrantRight(Right => 'CreateGroupDashboard', Object => $inner_group);
-$m->follow_link_ok({ id => 'tools-dashboards-create'});
+$m->follow_link_ok({ id => 'home-dashboard_create'});
$m->form_name('ModifyDashboard');
is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id, "RT::Group-" . $inner_group->Id], "the only selectable privacies are user and inner group (not outer group)");
$m->field("Name" => 'inner dashboard');
@@ -70,7 +70,7 @@ $m->content_lacks('Delete', "Delete button hidden because we are creating");
$m->click_button(value => 'Create');
-$m->content_contains("created", "we lack SeeGroupDashboard, so we end up back at the index.");
+$m->content_contains("saved", "we lack SeeGroupDashboard, so we end up back at the index.");
$user_obj->PrincipalObj->GrantRight(
Right => 'SeeGroupDashboard',
Object => $inner_group,
diff --git a/t/web/dashboards-permissions.t b/t/web/dashboards-permissions.t
index c0a0b11..f2e59e5 100644
--- a/t/web/dashboards-permissions.t
+++ b/t/web/dashboards-permissions.t
@@ -29,7 +29,7 @@ $user_obj->PrincipalObj->GrantRight(Right => $_, Object => $RT::System)
ok $m->login(customer => 'customer'), "logged in";
-$m->follow_link_ok( {id => 'tools-dashboards-create'});
+$m->follow_link_ok( {id => 'home-dashboard_create'});
$m->form_name('ModifyDashboard');
is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
$m->content_lacks('Delete', "Delete button hidden because we are creating");
diff --git a/t/web/walk.t b/t/web/walk.t
index 1986ed1..abdac2c 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 93;
+use RT::Test tests => 92;
my ( $baseurl, $m ) = RT::Test->started_ok;
@@ -33,7 +33,7 @@ diag 'walk into /Tools' if $ENV{TEST_VERBOSE};
$m->get_ok( $baseurl, 'homepage' );
$m->follow_link_ok( { text => 'Tools' }, '-> Tools' );
- for my $tab ( 'Dashboards', 'Offline', 'My Day' )
+ for my $tab ( 'Offline', 'My Day' )
{
$m->follow_link_ok( { text => $tab }, "-> $tab" );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list