[Rt-commit] rtir branch, 4.2-theme/migrate-to-elevator-themes, updated. 4.0.1rc1-106-g0e391781
Blaine Motsinger
blaine at bestpractical.com
Tue Sep 24 12:46:36 EDT 2019
The branch, 4.2-theme/migrate-to-elevator-themes has been updated
via 0e391781cbfb3f0af9abed984b7af6bdfdc86824 (commit)
from 21508531b282aa9d7daa487efcdfb94bd6640f24 (commit)
Summary of changes:
t/articles/on-create.t | 26 +++-----------------------
t/articles/on-update.t | 28 +++-------------------------
2 files changed, 6 insertions(+), 48 deletions(-)
- Log -----------------------------------------------------------------
commit 0e391781cbfb3f0af9abed984b7af6bdfdc86824
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Sep 24 11:45:18 2019 -0500
Fix articles tests for RT 4.6 articles refactor
diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index b319f530..014e5362 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -38,6 +38,8 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
# TODO: Once incident+investigation creation is re-added, this should be put back
#foreach my $q_name ( 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ) {
foreach my $q_name ( 'Incident Reports', 'Investigations', 'Countermeasures' ) {
+ note( "testing article in '$q_name' ticket create" );
+
my $queue = RT::Queue->new(RT->SystemUser);
$queue->Load( $q_name );
ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
@@ -47,29 +49,7 @@ foreach my $q_name ( 'Incident Reports', 'Investigations', 'Countermeasures' ) {
$agent->form_name('TicketCreate');
like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->field($prefix.'Articles-Include-Article-Named' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
-
- ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->select($prefix .'Articles-Include-Article-Named-Hotlist' => $article_id);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
-
- ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->field($prefix .'Articles_Content' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/^\s*$/ );
- $agent->click($prefix .'Articles-Include-Article-'. $article_id);
- $agent->form_name('TicketCreate');
- like( $agent->field( $content_name ), qr/this is a content/ );
+ $agent->content_contains( 'some article', 'got article in dropdown' );
}
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index e0ee087d..8842d127 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -35,6 +35,8 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
my $incident_id;
foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ) {
+ note( "testing article in '$queue' ticket update" );
+
my $id = $agent->create_rtir_ticket_ok(
$queue,
{
@@ -49,31 +51,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Counterm
$agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
$agent->form_name('TicketUpdate');
like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->field('Articles-Include-Article-Named' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
-
- $agent->goto_ticket( $id );
- $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->select('Articles-Include-Article-Named-Hotlist' => $article_id);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
-
- $agent->goto_ticket( $id );
- $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->field('Articles_Content' => $article_name);
- $agent->click('Go');
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/^\s*$/ );
- $agent->click('Articles-Include-Article-'. $article_id);
- $agent->form_name('TicketUpdate');
- like( $agent->field('UpdateContent'), qr/this is a content/ );
+ $agent->content_contains( 'some article', 'got article in dropdown' );
}
undef $agent;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list