[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-200-gecaed7b

Shawn Moore sartak at bestpractical.com
Thu Jul 22 21:32:24 EDT 2010


The branch, new-style-templates has been updated
       via  ecaed7b8a9c17045a0884f4bd8a29ebca459dedf (commit)
       via  133b5fab5e878d1141aad2b004ee429cd054ab67 (commit)
      from  19966050357a5dcc03522e4e7c546de066239e1b (commit)

Summary of changes:
 share/html/Admin/Global/Template.html |    2 +-
 share/html/Admin/Queues/Template.html |    2 +-
 t/web/template.t                      |   41 +++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 t/web/template.t

- Log -----------------------------------------------------------------
commit 133b5fab5e878d1141aad2b004ee429cd054ab67
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 22 21:33:49 2010 -0400

    Name the ModifyTemplate form for easier tests

diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index f3a09f3..cf362c3 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -53,7 +53,7 @@
     Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="Template.html">
+<form method="post" name="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index 9f4f0bf..e169ed0 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -54,7 +54,7 @@
      Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="Template.html">
+<form method="post" name="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {

commit ecaed7b8a9c17045a0884f4bd8a29ebca459dedf
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 22 21:34:02 2010 -0400

    Begin writing web-based tests for templates

diff --git a/t/web/template.t b/t/web/template.t
new file mode 100644
index 0000000..ec8fff0
--- /dev/null
+++ b/t/web/template.t
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+use RT::Test tests => 26;
+
+my ($baseurl, $m) = RT::Test->started_ok;
+
+ok $m->login, 'logged in';
+
+# get to the templates screen
+$m->follow_link( text => 'Configuration' );
+$m->title_is(q{RT Administration}, 'admin screen');
+
+$m->follow_link( text => 'Global' );
+$m->title_is(q{Admin/Global configuration}, 'global admin');
+
+$m->follow_link( text => 'Templates' );
+$m->title_is(q{Modify templates which apply to all queues}, 'global templates');
+
+$m->follow_link( text => 'Resolved' ); # template name
+$m->title_is(q{Modify template Resolved}, 'modifying the Resolved template');
+
+# now try changing Type back and forth
+$m->form_name('ModifyTemplate');
+is($m->value('Type'), 'Full');
+
+$m->field(Type => 'Simple');
+$m->submit;
+
+$m->title_is(q{Modify template Resolved}, 'modifying the Resolved template');
+$m->form_name('ModifyTemplate');
+is($m->value('Type'), 'Simple');
+
+$m->field(Type => 'Full');
+$m->submit;
+
+$m->title_is(q{Modify template Resolved}, 'modifying the Resolved template');
+$m->form_name('ModifyTemplate');
+is($m->value('Type'), 'Full');
+

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


More information about the Rt-commit mailing list