[Rt-commit] [rtir] 01/01: test 'Edit Search' menu in Merge page
? sunnavy
sunnavy at bestpractical.com
Wed Jul 17 09:33:57 EDT 2013
This is an automated email from the git hooks/post-receive script.
sunnavy pushed a commit to branch 3.0/search-menu-tests
in repository rtir.
commit 6afa04a0b3cfbdee880a3784e3646c58b64c218a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jul 17 21:32:51 2013 +0800
test 'Edit Search' menu in Merge page
---
t/searches/merge.t | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/t/searches/merge.t b/t/searches/merge.t
new file mode 100644
index 0000000..69562b4
--- /dev/null
+++ b/t/searches/merge.t
@@ -0,0 +1,47 @@
+use strict;
+use warnings;
+
+use RT::IR::Test tests => undef;
+
+RT::Test->started_ok;
+my $m = default_agent();
+
+{
+ my @incidents;
+ for my $subject (qw/foo bar baz/) {
+ push @incidents,
+ $m->create_incident(
+ {
+ Subject => "incident $subject",
+ }
+ );
+ }
+
+ my $incident_foo = $incidents[0];
+ $m->display_ticket($incident_foo);
+ $m->follow_link_ok( { text => 'Merge' } );
+
+ for my $incident_id ( @incidents[ 1 .. 2 ] ) {
+ ok( $m->find_link( url_regex => qr{/Ticket/Display.html\?id=$incident_id$} ),
+ "found link to incident $incident_id" );
+ }
+
+ $m->follow_link_ok( { text => "Edit Search" } );
+ $m->form_name('BuildQuery');
+ my ($input_query) = $m->find_all_inputs( name => 'Query' );
+ is( $input_query->value, q{( Queue = 'Incidents' ) AND Status = 'open'}, 'Query input is correct' );
+
+ $m->submit_form_ok(
+ {
+ with_fields => { idOp => '!=', ValueOfid => $incidents[1] },
+ button => 'DoSearch'
+ },
+ "add new term 'id != $incidents[1]'"
+ );
+ ok( !$m->find_link( url_regex => qr{/Ticket/Display.html\?id=$incidents[1]$} ),
+ "didn't find link to incident $incidents[1]" );
+ ok( $m->find_link( url_regex => qr{/Ticket/Display.html\?id=$incidents[2]$} ),
+ "found link to incident $incidents[2]" );
+}
+
+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