[Rt-commit] r12094 - in rt/branches/3.8-TESTING: . html/Dashboards
sartak at bestpractical.com
sartak at bestpractical.com
Tue May 6 06:39:19 EDT 2008
Author: sartak
Date: Tue May 6 06:39:18 2008
New Revision: 12094
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/html/Dashboards/Queries.html
rt/branches/3.8-TESTING/t/web/dashboards.t
Log:
r55084 at onn: sartak | 2008-05-05 22:52:02 -0400
Some more tests
Modified: rt/branches/3.8-TESTING/html/Dashboards/Queries.html
==============================================================================
--- rt/branches/3.8-TESTING/html/Dashboards/Queries.html (original)
+++ rt/branches/3.8-TESTING/html/Dashboards/Queries.html Tue May 6 06:39:18 2008
@@ -55,7 +55,7 @@
<& /Elements/ListActions, actions => \@results &>
-<form action="<%$RT::WebPath%>/Dashboards/Queries.html" method="post" enctype="multipart/form-data">
+<form action="<%$RT::WebPath%>/Dashboards/Queries.html" method="post" enctype="multipart/form-data" name="DashboardQueries">
<input type="hidden" class="hidden" name="id" value="<%$Dashboard->Id%>" />
<input type="hidden" class="hidden" name="Privacy" value="<%$Dashboard->Privacy%>" />
<table width="100%" border="0">
@@ -110,12 +110,7 @@
for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
my ($desc, $search) = @$_;
my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
-
- my $privacy = $object->isa('RT::User') ? 'RT::User-' . $object->Id
- : $object->isa('RT::Group') ? 'RT::Group-' . $object->Id
- : $object->isa('RT::System') ? 'RT::System'
- : '';
-
+ my $privacy = $Dashboard->_build_privacy($object);
my $name = $search->Id . '-' . $privacy;
push @items, [$name, $desc];
$desc_of{$name} = $desc;
Modified: rt/branches/3.8-TESTING/t/web/dashboards.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/dashboards.t (original)
+++ rt/branches/3.8-TESTING/t/web/dashboards.t Tue May 6 06:39:18 2008
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 9;
+use Test::More tests => 23;
use RT::Test;
my ($baseurl, $m) = RT::Test->started_ok;
@@ -14,6 +14,7 @@
$user_obj->SetPrivileged(1);
($ret, $msg) = $user_obj->SetPassword('customer');
$user_obj->PrincipalObj->GrantRight(Right => 'ModifySelf');
+my $currentuser = RT::CurrentUser->new($user_obj);
ok $m->login(customer => 'customer'), "logged in";
@@ -38,4 +39,21 @@
$m->content_lacks("No permission to create dashboards");
$m->content_contains("Saved dashboard different dashboard");
+$m->get_ok($url."Dashboards/index.html");
+$m->content_contains("different dashboard");
+
+$m->follow_link_ok({text => "different dashboard"});
+$m->content_contains("Basics");
+$m->content_contains("Queries");
+$m->content_lacks("Subscription", "we don't have the SubscribeDashboard right");
+$m->content_contains("Preview");
+
+$m->follow_link_ok({text => "Basics"});
+$m->content_contains("Modify the dashboard different dashboard");
+
+$m->follow_link_ok({text => "Queries"});
+$m->content_contains("Modify the queries of dashboard different dashboard");
+$m->form_name('DashboardQueries');
+$m->field('Searches-Available' => ["2-RT::System"]);
+$m->click_button(name => 'add');
More information about the Rt-commit
mailing list