[Rt-commit] rt branch, menu-redo, updated. e39f9ddef4f1f1e340c6bca8ea73a31309804ba2

jesse jesse at bestpractical.com
Mon Nov 9 21:25:50 EST 2009


The branch, menu-redo has been updated
       via  e39f9ddef4f1f1e340c6bca8ea73a31309804ba2 (commit)
       via  eb945a08247e9498e07209940d1c868a4267a8a3 (commit)
       via  5a951c9f6e7e78c55a0c6f4cfbc4d230001bef72 (commit)
       via  73b5766a44236e9d213e7e3238f0452d43ee3ae3 (commit)
      from  fd8c6d433615a86630318b17a43bfc6d697d8f8f (commit)

Summary of changes:
 lib/RT/Dispatcher.pm              |    6 ++++--
 share/html/Dashboards/Modify.html |    2 --
 t/web/cf_select_one.t             |    6 +++---
 t/web/dashboards-groups.t         |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

- Log -----------------------------------------------------------------
commit 73b5766a44236e9d213e7e3238f0452d43ee3ae3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 9 21:24:45 2009 -0500

    cf select one tests fixed for our new menus

diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index cd00aa6..f25413f 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -91,7 +91,7 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
@@ -113,7 +113,7 @@ diag "check that 0 is ok value of the CF"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
@@ -138,7 +138,7 @@ diag "check that we can set empty value when the current is 0"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 

commit 5a951c9f6e7e78c55a0c6f4cfbc4d230001bef72
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 9 21:25:02 2009 -0500

    group dashboards tests tweaked for new standardized nomenclature

diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 94566cd..6a1de1d 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -59,14 +59,14 @@ ok $m->login(customer => 'customer'), "logged in";
 
 $m->get_ok("$url/Dashboards");
 
-$m->follow_link_ok({text => "New dashboard"});
+$m->follow_link_ok({text => "Create"});
 $m->form_name( 'modify_dashboard' );
 is_deeply([$m->current_form->find_input('privacy')->possible_values], ["RT::Model::User-" . $user_obj->id], "the only selectable privacy is user");
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $user_obj->principal->grant_right(right => 'CreateGroupDashboard', object => $inner_group);
 
-$m->follow_link_ok({text => "New dashboard"});
+$m->follow_link_ok({text => "Create"});
 $m->form_name( 'modify_dashboard' );
 is_deeply([$m->current_form->find_input('privacy')->possible_values],
         ["RT::Model::User-" . $user_obj->id, "RT::Model::Group-" . $inner_group->id], "the only selectable privacies are user and inner group (not outer group)");

commit eb945a08247e9498e07209940d1c868a4267a8a3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 9 21:25:23 2009 -0500

    removing debugging output

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 9c7d790..2ed8e74 100644
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -113,8 +113,6 @@ else {
 
         push @results, $msg;
 		$id = $Dashboard->id;
-	warn Jifty->web->url . "Dashboards/Modify.html?id=" . $Dashboard->id;
-	warn join(',', at results);
     RT::Interface::Web::redirect(
 	url      => Jifty->web->url . "Dashboards/Modify.html?id=" . $Dashboard->id,
 	messages => \@results

commit e39f9ddef4f1f1e340c6bca8ea73a31309804ba2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 9 21:25:30 2009 -0500

    get dashboards top-level nav to show up at /Dashboards

diff --git a/lib/RT/Dispatcher.pm b/lib/RT/Dispatcher.pm
index 9d5e3dd..2c47203 100644
--- a/lib/RT/Dispatcher.pm
+++ b/lib/RT/Dispatcher.pm
@@ -279,13 +279,15 @@ before qr{.*} => run {
     }
 };
 
-before qr'Dashboards/(\d*)?' => run {
-	page_nav->child( _('Select'), url => "/Dashboards/index.html" );
+before qr'Dashboards/?' => run {
 	require RT::Dashboard; # not a record class, so not autoloaded :/
+	page_nav->child( _('Select'), url => "/Dashboards/index.html" );
     if ( RT::Dashboard->new->_privacy_objects( create => 1 ) ) {
         page_nav->child( _('Create') => url => "/Dashboards/Modify.html?create=1" );
     }
+};
 
+before qr'Dashboards/(\d*)?' => run {
     if ( my $id = ($1 || Jifty->web->request->argument('id') )) {
         my $obj = RT::Dashboard->new();
         $obj->load_by_id($id);

-----------------------------------------------------------------------


More information about the Rt-commit mailing list