[Rt-commit] rt branch, admin_ui, updated. 3968fa16d122f642ea6384abeb7f4a55eefb7e34
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 28 03:45:15 EST 2010
The branch, admin_ui has been updated
via 3968fa16d122f642ea6384abeb7f4a55eefb7e34 (commit)
from c195618ca79dbac683f6240af320c068b3de7d40 (commit)
Summary of changes:
t/web/custom_frontpage.t | 4 +++-
t/web/custom_search.t | 31 +++++++++++++++----------------
2 files changed, 18 insertions(+), 17 deletions(-)
- Log -----------------------------------------------------------------
commit 3968fa16d122f642ea6384abeb7f4a55eefb7e34
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jan 28 16:45:05 2010 +0800
update custom_(search|frontpage).t
diff --git a/t/web/custom_frontpage.t b/t/web/custom_frontpage.t
index 1c4e85f..4fb746a 100644
--- a/t/web/custom_frontpage.t
+++ b/t/web/custom_frontpage.t
@@ -48,6 +48,8 @@ $m->content_lacks( 'highest priority tickets',
'remove everything from body pane' );
$m->get( $url . '/prefs/my_rt' );
-$m->fill_in_action_ok( $moniker, body => 'system-Unowned Tickets', );
+$m->fill_in_action_ok( $moniker, body => 'system-My Tickets', );
+$m->submit;
$m->get($url);
$m->content_like( qr'highest priority tickets', 'adds them back' );
+
diff --git a/t/web/custom_search.t b/t/web/custom_search.t
index 23b9a38..967a54d 100644
--- a/t/web/custom_search.t
+++ b/t/web/custom_search.t
@@ -2,7 +2,7 @@
use strict;
use RT::Test strict => 1;
-use Test::More tests => 12;
+use Test::More tests => 14;
my ( $baseurl, $m ) = RT::Test->started_ok;
my $url = $m->rt_base_url;
@@ -28,17 +28,17 @@ $m->get( $url . '/prefs/my_rt' );
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');
+$m->content_like(qr'Customize Search');
# add Requestor to the fields
-$m->form_name('build_query');
+$m->form_name('prefs_edit_search_options');
# can't use submit form for mutli-valued select as it uses set_fields
$m->field( select_display_columns => ['requestors'] );
$m->click_button( name => 'add_col' );
-$m->form_name('build_query');
-$m->click_button( name => 'save' );
+$m->form_name('prefs_edit_search_options');
+$m->click_button( name => 'J:A:F-save-prefs_edit_search_options' );
$m->get($url);
$m->content_contains( 'customsearch at localhost', 'requestor now displayed ' );
@@ -46,17 +46,17 @@ $m->content_contains( 'customsearch at localhost', 'requestor now displayed ' );
# now remove Requestor from the fields
$m->get($cus_hp);
-$m->form_name('build_query');
-
+$m->form_name('prefs_edit_search_options');
my $cdc = $m->current_form->find_input('current_display_columns');
-my ($requestor_value) = grep { /requestor/ } $cdc->possible_values;
+my ($requestor_value) = grep { /requestor/ } $cdc->value_names;
ok( $requestor_value, "got the requestor value" );
+$m->form_name('prefs_edit_search_options');
$m->field( current_display_columns => $requestor_value );
$m->click_button( name => 'remove_col' );
-$m->form_name('build_query');
-$m->click_button( name => 'save' );
+$m->form_name('prefs_edit_search_options');
+$m->click_button( name => 'J:A:F-save-prefs_edit_search_options' );
$m->get($url);
$m->content_lacks( 'customsearch at localhost', 'requestor not displayed ' );
@@ -67,10 +67,10 @@ $m->content_lacks( 'customsearch at localhost', 'requestor not displayed ' );
# since ticked quese are wanted, we do the invesrsion. So any
# queue added during the quicksearch setting will be unticked.
my $nlinks = $#{ $m->find_all_links( text => "General" ) };
+
$m->get($cus_qs);
-$m->form_name('preferences');
-$m->untick( 'Want-General', '1' );
-$m->click_button( name => 'save' );
+$m->fill_in_action_ok('prefs_edit_quick_search', queues => 0);
+$m->submit;
$m->get($url);
is(
@@ -81,9 +81,8 @@ is(
# get it back
$m->get($cus_qs);
-$m->form_name('preferences');
-$m->tick( 'Want-General', '1' );
-$m->click_button( name => 'save' );
+$m->fill_in_action_ok('prefs_edit_quick_search', queues => 'General');
+$m->submit;
$m->get($url);
is( $#{ $m->find_all_links( text => "General" ) },
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list