[Rt-commit] r2638 - in rt/branches/PLATANO-EXPERIMENTAL: . etc html/Elements html/Prefs html/Search html/User/Elements html/Widgets lib/RT lib/t/regression sbin

jesse at bestpractical.com jesse at bestpractical.com
Sat Apr 16 02:41:57 EDT 2005


Author: jesse
Date: Sat Apr 16 02:41:54 2005
New Revision: 2638

Modified:
   rt/branches/PLATANO-EXPERIMENTAL/   (props changed)
   rt/branches/PLATANO-EXPERIMENTAL/etc/initialdata
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MyRT
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MySupportQueues
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Quicksearch
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/ShowSearch
   rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/MyRT.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Quicksearch.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Search.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Search/Build.html
   rt/branches/PLATANO-EXPERIMENTAL/html/User/Elements/Tabs
   rt/branches/PLATANO-EXPERIMENTAL/html/Widgets/SelectionBox
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/17custom_search.t
   rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t
   rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in
Log:
 r12971 at hualien:  jesse | 2005-04-16 02:16:09 -0400
  r6625 at hualien:  jesse | 2005-03-08 23:18:58 -0500
   r6570 at hualien (orig r2307):  clkao | 2005-03-07 11:59:06 -0500
   Require newer Test::WWW::Mechanize.
   r6571 at hualien (orig r2308):  clkao | 2005-03-07 12:33:59 -0500
   merge down
   r6572 at hualien (orig r2309):  clkao | 2005-03-07 13:30:20 -0500
   Saving search to RT::System now works.
   r6573 at hualien (orig r2310):  clkao | 2005-03-07 13:35:18 -0500
   Restore the original ordering after tests.
   r6574 at hualien (orig r2311):  clkao | 2005-03-07 13:47:39 -0500
   Proper locs.
   r6605 at hualien (orig r2314):  clkao | 2005-03-08 12:11:43 -0500
   Misc UI changes, and according test tweaks.
   r6606 at hualien (orig r2315):  clkao | 2005-03-08 13:05:59 -0500
   oops
  
 


Modified: rt/branches/PLATANO-EXPERIMENTAL/etc/initialdata
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/etc/initialdata	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/etc/initialdata	Sat Apr 16 02:41:54 2005
@@ -609,15 +609,15 @@
         Order   => 'DESC',
 	SummaryRows => 10, },
     },
-    { Name => 'My RT',
-      Description => 'My RT',
+    { Name => 'HomepageSettings',
+      Description => 'HomepageSettings',
       Content =>
-      { main =>
+      { 'body' => # loc
 	[ { type => 'system', name => 'My Tickets' },
 	  { type => 'system', name => 'My Requests' },
 	  { type => 'component',  name => 'QuickCreate'},
 	],
-        right =>
+        'summary' => # loc
 	[ { type => 'component', name => 'Quicksearch' },
 	  { type => 'component', name => 'MySupportQueues' },
 	  { type => 'component', name => 'MyAdminQueues' },

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MyRT
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MyRT	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MyRT	Sat Apr 16 02:41:54 2005
@@ -48,7 +48,7 @@
 <TR VALIGN=TOP>
 <TD WIDTH=70% class="boxcontainer">
 
-% for my $portlet (@{$portlets->{main}}) {
+% for my $portlet (@{$portlets->{body}}) {
 <% _show($portlet) %>
 <BR>
 % }
@@ -57,7 +57,7 @@
 </TD>
 <TD class="boxcontainer">
 
-% for my $portlet (@{$portlets->{right}}) {
+% for my $portlet (@{$portlets->{summary}}) {
 <% _show($portlet) %>
 <BR>
 % }
@@ -65,8 +65,6 @@
 </TD>
 </TR>
 </TABLE>
-<a href="<%$RT::WebPath%>/Prefs/MyRT.html"><&|/l&>Customize</&></a>
-
 
 <%INIT>
 
@@ -74,9 +72,9 @@
     qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues RefreshHomepage);
 
 unless (exists $session{'my_rt_portlets'}) {
-    my ($d_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('My RT');
+    my ($d_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
     my $user = $session{'CurrentUser'}->UserObj;
-    $session{'my_rt_portlets'} = $user->Preferences('My RT', $d_portlets->Content);
+    $session{'my_rt_portlets'} = $user->Preferences('HomepageSettings', $d_portlets->Content);
 }
 
 my $portlets = $session{'my_rt_portlets'};

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MySupportQueues
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MySupportQueues	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MySupportQueues	Sat Apr 16 02:41:54 2005
@@ -43,7 +43,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|/Elements/TitleBox, title => loc("My support queues"), bodyclass => "" &>
+<&|/Elements/TitleBox, title => loc("Queues I'm an AdminCc for"), bodyclass => "" &>
 <& /Elements/QueueSummary,
    cache => 'my_support_queues',
    queue_filter => sub { $_->IsAdminCc($session{'CurrentUser'}->Id) },

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Quicksearch
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Quicksearch	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Quicksearch	Sat Apr 16 02:41:54 2005
@@ -44,7 +44,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <&|/Elements/TitleBox, title => loc("Quick search"), bodyclass => "",
-   titleright => loc("Customize"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &>
+#   titleright => loc("Customize"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &>
 <& /Elements/QueueSummary,
    cache => 'quick_search_queues',
    queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} },

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/ShowSearch
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/ShowSearch	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/ShowSearch	Sat Apr 16 02:41:54 2005
@@ -46,8 +46,8 @@
 <&|/Elements/TitleBox,
     title => loc($search->Description, $rows),
     title_href => "Search/Results.html".$QueryString,
-    titleright => loc('Customize'),
-    titleright_href => $customize &>
+#    titleright => loc('Customize'),
+#    titleright_href => $customize &>
 <& /Elements/TicketList, %$SearchArg,
         Rows => $rows,
         ShowNavigation => 0
@@ -72,7 +72,7 @@
 }
 else {
     ($search) = RT::System->new($session{'CurrentUser'})->Attributes->Named('Search - '.$Name);
-    unless ($search->Id) {
+    unless ($search && $search->Id) {
 	$m->out ("Predefined search $Name not found");
 	return;
     }

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/MyRT.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/MyRT.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/MyRT.html	Sat Apr 16 02:41:54 2005
@@ -44,8 +44,8 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
-    current_toptab => '',
+<& /User/Elements/Tabs,
+    current_tab => 'Prefs/MyRT.html',
     Title => $title
 &>
 
@@ -53,20 +53,31 @@
 
 <& /Elements/ListActions, actions => \@actions &>
 <a href="<% $ARGS{'referer'} %>"><&|/l&>Go back</&></a><br>
+<p>
+<&|/Elements/TitleBox, title => loc('Predefined searches'), bodyclass => "" &>
+<ul>
+<li><a href="<% $RT::WebPath %>/Prefs/Quicksearch.html"><&|/l&>Quick search</&></a></li>
+% for my $search (@sys_searches) {
+<li><a href="<% $RT::WebPath.'/Prefs/Search.html?'.$m->comp('/Elements/QueryString', name => ref($search->[1]).'-'.$search->[1]->Id) %>"><% $search->[0] %></a></li>
+% }
+</ul>
+</&>
 
 % for my $pane (@panes) {
+<&|/Elements/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
 <& /Widgets/SelectionBox:show, self => $pane &>
+</&>
 % }
 <%INIT>
 my @actions;
 
-my $title = loc("Customize").' '.loc("My RT");
+my $title = loc("Customize").' '.loc("RT at a glance");
 my $user = $session{'CurrentUser'}->UserObj;
 $ARGS{'referer'} ||= $ENV{'HTTP_REFERER'};
 
 unless (exists $session{'my_rt_portlets'}) {
-    my ($d_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('My RT');
-    $session{'my_rt_portlets'} = $user->Preferences('My RT', $d_portlets->Content);
+    my ($d_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
+    $session{'my_rt_portlets'} = $user->Preferences('HomepageSettings', $d_portlets->Content);
 }
 
 my $portlets = $session{'my_rt_portlets'};
@@ -88,11 +99,13 @@
 $groups->LimitToUserDefinedGroups;
 $groups->WithMember(PrincipalId => $session{'CurrentUser'}->Id,
                     Recursively => 1);
+my @sys_searches;
 for my $object ($sys, $user, @{$groups->ItemsArrayRef()}) {
     for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
 	my ($desc, $search) = @$_;
 	if ($object eq $sys) {
-	    push @items, ["system-$desc", $desc],
+	    push @items, ["system-$desc", $desc];
+	    push @sys_searches, [$desc, $search];
 	}
 	else {
 	    my $oid = ref($object).'-'.$object->Id.'-SavedSearch-'.$search->Id;
@@ -103,7 +116,7 @@
 
 my %item_map = map {$_->[0] => $_->[1]} @items;
 my @panes;
-for my $pane ('main', 'right') {
+for my $pane ('body', 'summary') {
     push @panes,
 	$m->comp ('/Widgets/SelectionBox:new',
 		  Action => 'MyRT.html',
@@ -116,7 +129,7 @@
 				   { type => $1,
 				     name => $2,
 				 }} @{$sel->{Current}}];
-			$user->SetPreferences('My RT', $portlets);
+			$user->SetPreferences('HomepageSettings', $portlets);
 			push @actions, loc ('Preferences saved for [_1].', $pane);
 			delete $session{'my_rt_portlets'};
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Quicksearch.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Quicksearch.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Quicksearch.html	Sat Apr 16 02:41:54 2005
@@ -44,8 +44,8 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
-#    current_tab => "Search/Build.html".$QueryString, 
+<& /User/Elements/Tabs,
+    current_tab => 'Prefs/MyRT.html',
     Title => $title
 &>
 <& /Elements/ListActions, actions => \@actions &>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Search.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Search.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Prefs/Search.html	Sat Apr 16 02:41:54 2005
@@ -44,12 +44,19 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
-#    current_tab => "Search/Build.html".$QueryString, 
-    Title => $title, %$SearchArg
+<& /User/Elements/Tabs,
+    current_tab => 'Prefs/MyRT.html',
+    Title => $title
 &>
 <& /Elements/ListActions, actions => \@actions &>
 <a href="<% $ARGS{'referer'} %>"><&|/l&>Go back</&></a><br>
+% if ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
+<&|/l&>You can also edit the predefined search itself</&>:
+<a href="<% $RT::WebPath.'/Search/Build.html?'.
+	$m->comp('/Elements/QueryString',
+		 LoadSavedSearch => 'RT::System-1-SavedSearch-'.$id) %>"><% $search->Name %></a>
+% }
+<br>
 <FORM METHOD="POST" ACTION="Search.html" NAME="BuildQuery">
 <input type=hidden name=name value="<%$ARGS{name}%>">
 <input type=hidden name=referer value="<%$ARGS{referer}%>">
@@ -74,7 +81,7 @@
 
 my $search = $class->new ($session{'CurrentUser'});
 $search->LoadById ($id);
-$title .= loc ($search->Description, 'N');
+$title .= loc ($search->Description, loc ('"N"'));
 my $user = $session{'CurrentUser'}->UserObj;
 my $SearchArg = $user->Preferences($search, $search->Content);
 for (@fields) {

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Search/Build.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Search/Build.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Search/Build.html	Sat Apr 16 02:41:54 2005
@@ -782,10 +782,10 @@
         my $container_object = _load_container_object ($obj_type, $obj_id);
 
         if ( $container_object->id ) {
-
+	    my $name = $obj_type eq 'RT::System' ? "Search - $Description" : 'SavedSearch';
             # If we got one or the other, add the saerch
             my ( $search_id, $search_msg ) = $container_object->AddAttribute(
-                Name        => 'SavedSearch',
+                Name        => $name,
                 Description => $Description,
                 Content     => {
                     Format      => $Format,

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/User/Elements/Tabs
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/User/Elements/Tabs	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/User/Elements/Tabs	Sat Apr 16 02:41:54 2005
@@ -59,6 +59,9 @@
 	       h => { title => loc('Delegation'),
 			   path => 'User/Delegation.html',
 			 },
+	       r => { title => loc('RT at a glance'),
+			   path => 'Prefs/MyRT.html',
+			 },
 	     };
 
   foreach my $tab (sort keys %{$tabs}) {

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Widgets/SelectionBox
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Widgets/SelectionBox	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Widgets/SelectionBox	Sat Apr 16 02:41:54 2005
@@ -166,15 +166,14 @@
 </%method>
 
 <%method show>
-<h2><% $name %></h2>
 <FORM METHOD="POST" ACTION="<%$self->{Action}%>" name="SelectionBox-<% $name %>" id="SelectionBox-<% $name %>">
 <input type="hidden" name="<% $self->{Name} %>-Submit" value="1">
 <& SelectionBox:current, self => $self &>
 <input type="hidden" name="referer" value="<%$ARGS{'referer'}%>">
 <input type="hidden" name="fromjs" value="0">
-Available:
+<&|/l&>Available</&>:
 % if ($self->{Modified}) {
-<b>(Modified, Please save)</b>
+<b><&|/l&>(Modified, Please save)</&></b>
 % }
 <br>
 <select name="<%$name%>-Available" multiple >
@@ -195,7 +194,7 @@
  <input name="moveup" type="submit" value="^"/>
  <input name="movedown" type="submit" value="v"/>
  <input name="remove" type="submit" value="X"/>
- <input name="submit" type="submit" value="Save"/>
+ <input name="submit" type="submit" value="<&|/l&>Save</&>"/>
 
 %# the save button does not work because it's not direct child of the form element
 %#<& /Elements/Submit, Caption => loc("Save"), Label => loc('Save'), Name => $name.'-Save' &>

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm	Sat Apr 16 02:41:54 2005
@@ -1721,6 +1721,77 @@
 
 # }}}
 
+# {{{ sub _CleanupInvalidDelegations
+
+=head2 sub _CleanupInvalidDelegations { InsideTransaction => undef }
+
+Revokes all ACE entries delegated by this user which are inconsistent
+with their current delegation rights.  Does not perform permission
+checks.  Should only ever be called from inside the RT library.
+
+If called from inside a transaction, specify a true value for the
+InsideTransaction parameter.
+
+Returns a true value if the deletion succeeded; returns a false value
+and logs an internal error if the deletion fails (should not happen).
+
+=cut
+
+# XXX Currently there is a _CleanupInvalidDelegations method in both
+# RT::User and RT::Group.  If the recursive cleanup call for groups is
+# ever unrolled and merged, this code will probably want to be
+# factored out into RT::Principal.
+
+sub _CleanupInvalidDelegations {
+    my $self = shift;
+    my %args = ( InsideTransaction => undef,
+		  @_ );
+
+    unless ( $self->Id ) {
+	$RT::Logger->warning("User not loaded.");
+	return (undef);
+    }
+
+    my $in_trans = $args{InsideTransaction};
+
+    return(1) if ($self->HasRight(Right => 'DelegateRights',
+				  Object => $RT::System));
+
+    # Look up all delegation rights currently posessed by this user.
+    my $deleg_acl = RT::ACL->new($RT::SystemUser);
+    $deleg_acl->LimitToPrincipal(Type => 'User',
+				 Id => $self->PrincipalId,
+				 IncludeGroupMembership => 1);
+    $deleg_acl->Limit( FIELD => 'RightName',
+		       OPERATOR => '=',
+		       VALUE => 'DelegateRights' );
+    my @allowed_deleg_objects = map {$_->Object()}
+	@{$deleg_acl->ItemsArrayRef()};
+
+    # Look up all rights delegated by this principal which are
+    # inconsistent with the allowed delegation objects.
+    my $acl_to_del = RT::ACL->new($RT::SystemUser);
+    $acl_to_del->DelegatedBy(Id => $self->Id);
+    foreach (@allowed_deleg_objects) {
+	$acl_to_del->LimitNotObject($_);
+    }
+
+    # Delete all disallowed delegations
+    while ( my $ace = $acl_to_del->Next() ) {
+	my $ret = $ace->_Delete(InsideTransaction => 1);
+	unless ($ret) {
+	    $RT::Handle->Rollback() unless $in_trans;
+	    $RT::Logger->warning("Couldn't delete delegated ACL entry ".$ace->Id);
+	    return (undef);
+	}
+    }
+
+    $RT::Handle->Commit() unless $in_trans;
+    return (1);
+}
+
+# }}}
+
 # {{{ sub _Set
 
 sub _Set {

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/17custom_search.t
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/17custom_search.t	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/17custom_search.t	Sat Apr 16 02:41:54 2005
@@ -29,8 +29,9 @@
 like ($t_link->url, qr/$id/, 'link to the ticket we created');
 
 $m->content_lacks ('customsearch at localhost', 'requestor not displayed ');
-
-my ($cus_hp, undef, $cus_qs) = $m->find_all_links( text => "Customize" );
+$m->get ( BaseURL.'Prefs/MyRT.html' );
+my $cus_hp = $m->find_link( text => "My Tickets" );
+my $cus_qs = $m->find_link( text => "Quick search" );
 $m->get ($cus_hp);
 $m->content_like (qr'highest priority tickets');
 
@@ -43,7 +44,7 @@
 $m->form_name ('BuildQuery');
 $m->click_button (name => 'Save');
 
-$m->follow_link (text => 'Go back') or die;
+$m->get( BaseURL );
 $m->content_contains ('customsearch at localhost', 'requestor now displayed ');
 
 
@@ -57,7 +58,7 @@
 $m->form_name ('BuildQuery');
 $m->click_button (name => 'Save');
 
-$m->follow_link (text => 'Go back') or die;
+$m->get( BaseURL );
 $m->content_lacks ('customsearch at localhost', 'requestor not displayed ');
 
 
@@ -73,7 +74,7 @@
 $m->untick('Want-General', '1');
 $m->click_button (name => 'Save');
 
-$m->follow_link (text => 'Go back') or die;
+$m->get( BaseURL );
 is ($#{$m->find_all_links( text => "General" )}, $nlinks - 1,
     'General gone from quicksearch list');
 
@@ -83,6 +84,6 @@
 $m->tick('Want-General', '1');
 $m->click_button (name => 'Save');
 
-$m->follow_link (text => 'Go back') or die;
+$m->get( BaseURL );
 is ($#{$m->find_all_links( text => "General" )}, $nlinks,
     'General back in quicksearch list');

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t	Sat Apr 16 02:41:54 2005
@@ -21,20 +21,28 @@
 $m->content_like(qr/Logout/, 'we did log in');
 
 $m->get ( BaseURL.'Prefs/MyRT.html' );
-$m->form_name ('SelectionBox-main');
+$m->form_name ('SelectionBox-body');
 # can't use submit form for mutli-valued select as it uses set_fields
-$m->field ('main-Selected' => ['component-QuickCreate', 'system-My Requests', 'system-My Tickets']);
+$m->field ('body-Selected' => ['component-QuickCreate', 'system-My Requests', 'system-My Tickets']);
 $m->click_button (name => 'remove');
-$m->form_name ('SelectionBox-main');
+$m->form_name ('SelectionBox-body');
 $m->click_button (name => 'submit');
 $m->get ( BaseURL );
-$m->content_lacks ('highest priority tickets');
+$m->content_lacks ('highest priority tickets', 'remove everything from body pane');
 
 $m->get ( BaseURL.'Prefs/MyRT.html' );
-$m->form_name ('SelectionBox-main');
-$m->field ('main-Available' => ['component-QuickCreate', 'system-My Requests', 'system-My Tickets']);
+$m->form_name ('SelectionBox-body');
+$m->field ('body-Available' => ['component-QuickCreate', 'system-My Requests', 'system-My Tickets']);
 $m->click_button (name => 'add');
-$m->form_name ('SelectionBox-main');
+
+$m->form_name ('SelectionBox-body');
+$m->field ('body-Selected' => ['component-QuickCreate']);
+$m->click_button (name => 'movedown');
+
+$m->form_name ('SelectionBox-body');
+$m->click_button (name => 'movedown');
+
+$m->form_name ('SelectionBox-body');
 $m->click_button (name => 'submit');
 $m->get ( BaseURL );
-$m->content_like (qr'highest priority tickets');
+$m->content_like (qr'highest priority tickets', 'adds them back');

Modified: rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in	Sat Apr 16 02:41:54 2005
@@ -184,7 +184,7 @@
 HTML::Form
 HTML::TokeParser
 WWW::Mechanize
-Test::WWW::Mechanize
+Test::WWW::Mechanize 1.04
 Module::Refresh 0.03
 .
 


More information about the Rt-commit mailing list