[Rt-commit] rtir branch, 4.0/correspondents-from-makeclicky, repushed

Brian Duggan brian at bestpractical.com
Mon Jun 4 16:40:30 EDT 2018


The branch 4.0/correspondents-from-makeclicky was deleted and repushed:
       was 17b81b5ab34bcb9dc54a8a33f28e7c1529913b39
       now 32947733684f9177bd2c6d862b69b7d18699a3b6

-:  ------- > 1: bcb13751 Update MakeClicky test text for readability
1: 2aa6f1f6 ! 2: d3de9323 Test for MakeClicky email links on all RTIR ticket types
    @@ -36,14 +36,14 @@
     -        my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
     -        $agent->save_content('/tmp/x.html');
     -        if ( $clicky{'email'} ) {
    --            ok( $email_link,                                   "found link $email_link" );
    --            ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'url '.$email_link->url.' has an email - '.$email );
    --            ok( $domain_link,                                    "found link" );
    --            ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'url has a domain' );
    +-            ok( $email_link,                                   "Found link for $email_link" );
    +-            ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'URL link '.$email_link->url.' has an email address: '.$email );
    +-            ok( $domain_link,                                    "Found link for URL domain" );
    +-            ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'URL link has a domain' );
     -        }
     -        else {
    --            ok( !$email_link, "not found email link" );
    --            ok( !$domain_link, "not found domain link" );
    +-            ok( !$email_link, "Didn't find link for email address" );
    +-            ok( !$domain_link, "Didn't find link for domain" );
     -        }
     -
     -    }
    @@ -64,14 +64,14 @@
     +            my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
     +            $agent->save_content('/tmp/x.html');
     +            if ( $clicky{'email'} ) {
    -+                ok( $email_link,                                   "found link $email_link" );
    -+                ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'url '.$email_link->url.' has an email - '.$email );
    -+                ok( $domain_link,                                    "found link" );
    -+                ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'url has a domain' );
    ++                ok( $email_link,                                   "Found link for $email_link" );
    ++                ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'URL link '.$email_link->url.' has an email address: '.$email );
    ++                ok( $domain_link,                                    "Found link for URL domain" );
    ++                ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'URL link has a domain' );
     +            }
     +            else {
    -+                ok( !$email_link, "not found email link" );
    -+                ok( !$domain_link, "not found domain link" );
    ++                ok( !$email_link, "Didn't find link for email address" );
    ++                ok( !$domain_link, "Didn't find link for domain" );
     +            }
      
     -        my ( $name, $domain );
    @@ -81,9 +81,9 @@
     -        my $id = $agent->create_ir( { Subject => 'clicky email', Content => $email } );
     -        $agent->display_ticket($id);
     -        my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    --        ok( !$email_link, "not found email link for $email" );
    +-        ok( !$email_link, "Didn't find an email link for $email" );
     -        my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    --        ok( !$domain_link, "not found domain link for $domain" );
    +-        ok( !$domain_link, "Didn't find a domain link for $domain" );
      
     -    }
     +        for my $email ( 'foo at example') {
    @@ -96,9 +96,9 @@
     +            my $id = $create_method_ref->( { Subject => 'clicky email', Content => $email } );
     +            $agent->display_ticket($id);
     +            my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    -+            ok( !$email_link, "not found email link for $email" );
    ++            ok( !$email_link, "Didn't find an email link for $email" );
     +            my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    -+            ok( !$domain_link, "not found domain link for $domain" );
    ++            ok( !$domain_link, "Didn't find a domain link for $domain" );
      
     -    for my $email ( '@example.com' ) {
     -        diag "test invalid email (no local part) $email" if $ENV{TEST_VERBOSE};
    @@ -117,16 +117,16 @@
     +            my $id = $create_method_ref->( { Subject => 'clicky email', Content => $email } );
     +            $agent->display_ticket($id);
     +            my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    -+            ok( !$email_link, "not found email link for $email" );
    ++            ok( !$email_link, "Didn't find link for $email" );
     +            my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    -+            ok( $domain_link, "still found the bare domain for $domain" );
    ++            ok( $domain_link, "Found the bare domain for $domain" );
              }
     -        my $id = $agent->create_ir( { Subject => 'clicky email', Content => $email } );
     -        $agent->display_ticket($id);
     -        my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    --        ok( !$email_link, "not found email link for $email" );
    +-        ok( !$email_link, "Didn't find link for $email" );
     -        my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    --        ok( $domain_link, "still found the bare domain for $domain" );
    +-        ok( $domain_link, "Found the bare domain for $domain" );
          }
     -
     -
2: c5ed46fe ! 3: 9139028a Test for 'Investigate to' links next to MakeClicky email adddresses
    @@ -23,11 +23,10 @@
     +
                  $agent->save_content('/tmp/x.html');
                  if ( $clicky{'email'} ) {
    -                 ok( $email_link,                                   "found link $email_link" );
    -                 ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'url '.$email_link->url.' has an email - '.$email );
    --                ok( $domain_link,                                    "found link" );
    -+                ok( $domain_link,                                    "found domain link" );
    -                 ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'url has a domain' );
    +                 ok( $email_link,                                   "Found link for $email_link" );
    +                 ok( $email_link->url =~ /(?<!\w)\Qq=$email\E(?!\w)/, 'URL link '.$email_link->url.' has an email address: '.$email );
    +                 ok( $domain_link,                                    "Found link for URL domain" );
    +                 ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'URL link has a domain' );
     +
     +                if ( $is_incident ) {
     +                    ok( $investigate_link, "found investigate link" );
    @@ -36,9 +35,9 @@
     +                }
                  }
                  else {
    -                 ok( !$email_link, "not found email link" );
    -                 ok( !$domain_link, "not found domain link" );
    -+                ok( !$investigate_link, "not found investigate link") if $is_incident;
    +                 ok( !$email_link, "Didn't find link for email address" );
    +                 ok( !$domain_link, "Didn't find link for domain" );
    ++                ok( !$investigate_link, "Didn't find 'Investigate to' link") if $is_incident;
                  }
      
              }
    @@ -48,14 +47,14 @@
                  $agent->display_ticket($id);
     +            my $is_incident = $agent->text() =~ qr/Queue: Incidents/;
                  my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    -             ok( !$email_link, "not found email link for $email" );
    +             ok( !$email_link, "Didn't find an email link for $email" );
                  my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    -             ok( !$domain_link, "not found domain link for $domain" );
    +             ok( !$domain_link, "Didn't find a domain link for $domain" );
      
     +            my $investigate_link = $agent->find_link( url_regex => qr/\QRequestors=$email\E/,
     +                                                      text_regex => qr/^\Qinvestigate to\E$/i )
     +                if $is_incident;
    -+            ok( !$investigate_link, "not found investigate link for $email" );
    ++            ok( !$investigate_link, "Didn't find 'Investigate to' link for $email" );
              }
      
              for my $email ( '@example.com' ) {
    @@ -65,13 +64,13 @@
                  $agent->display_ticket($id);
     +            my $is_incident = $agent->text() =~ qr/Queue: Incidents/;
                  my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    -             ok( !$email_link, "not found email link for $email" );
    +             ok( !$email_link, "Didn't find link for $email" );
                  my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    -             ok( $domain_link, "still found the bare domain for $domain" );
    +             ok( $domain_link, "Found the bare domain for $domain" );
     +            my $investigate_link = $agent->find_link( url_regex => qr/\QRequestors=$email\E/,
     +                                                      text_regex => qr/^\Qinvestigate to\E$/i )
     +                if $is_incident;
    -+            ok( !$investigate_link, "not found investigate link for $email" );
    ++            ok( !$investigate_link, "Didn't find 'Investigate to' link for $email" );
              }
          }
      }
3: 60521d12 ! 4: 3acf7ac5 Test Correspondents field on 'Investigate to' investigation creation
    @@ -36,8 +36,8 @@
      
                  $agent->save_content('/tmp/x.html');
     @@
    -                 ok( $domain_link,                                    "found domain link" );
    -                 ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'url has a domain' );
    +                 ok( $domain_link,                                    "Found link for URL domain" );
    +                 ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'URL link has a domain' );
      
     +                # Test that 'Investigate to' links go to the queue selection page for creating incidents.
     +                # Then test that the new investigation form on that page loads the investigation creation page.
4: 17b81b5a = 5: 32947733 Set correspondents from "Investigate to" MakeClicky link



More information about the rt-commit mailing list