[Rt-commit] [rtir] 01/02: RTIR had no real test of its search UI
Kevin Falcone
falcone at bestpractical.com
Thu Nov 20 11:38:48 EST 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/no-quotes-in-cf-search-attributes
in repository rtir.
commit ae667ea91153e8b8e9b7c4eac5a95478dd6e69d5
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Nov 20 11:18:40 2014 -0500
RTIR had no real test of its search UI
This doesn't exercise any of the format or other parsing, but does at
least test picking a queue and a custom field, which is more than we
had and will hopefully tease out other incompatible trunk changes in the
future.
---
t/searches/cf.t | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/t/searches/cf.t b/t/searches/cf.t
new file mode 100644
index 0000000..ebfb355
--- /dev/null
+++ b/t/searches/cf.t
@@ -0,0 +1,32 @@
+use strict;
+use warnings;
+
+use RT::IR::Test tests => undef;
+
+RT::Test->started_ok;
+my $m = default_agent();
+
+$m->create_incident( { Subject => "Spam Incident", }, { ('Classification' => 'Spam') } );
+$m->create_incident( { Subject => "Ham Incident", }, { ('Classification' => 'Query') } );
+
+$m->get_ok('/RTIR/Search/');
+$m->form_name( 'BuildQuery' );
+
+$m->submit_form(
+ fields => { 'ValueOfQueue' => 'Incidents' },
+ button => 'AddClause',
+);
+
+$m->form_name( 'BuildQuery' );
+my ($cf_field) = $m->find_all_inputs( type => 'option', name_regex => qr/ValueOf.*Classification/ );
+$m->submit_form(
+ fields => { $cf_field->name => 'Spam', },
+ button => 'DoSearch',
+);
+
+$m->content_contains( 'Spam Incident', 'has spam incident' );
+# failure mode is that the CF isn't added and so we find all incidents
+# we should only be finding Queue = 'Incidents' and CF.Classification = 'Spam'
+$m->content_lacks( 'Ham Incident', 'has not found the ham incident' );
+
+done_testing;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list