Skip to content

Commit

Permalink
Issue #2481: eliminate usage of $main::Self
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Sep 28, 2023
1 parent b6b9927 commit 8743766
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions scripts/test/Selenium/Output/PDFTicket.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ use utf8;
use Test2::V0;

# OTOBO modules
use Kernel::System::UnitTest::RegisterDriver;
use Kernel::System::UnitTest::RegisterOM; # set up $Kernel::OM
use Kernel::System::UnitTest::Selenium;

our $Self;

my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 );

diag $Selenium->{browser_name};
if ( $Selenium->{browser_name} ne 'firefox' ) {
skip_all("PDF tests are currently only supported on Firefox");
}
Expand Down Expand Up @@ -373,7 +372,7 @@ $Selenium->RunTest(
%{ $DynamicFields{$DynamicFieldType} },
);

$Self->True(
ok(
$DynamicFieldID,
"Created DynamicField $DynamicFields{$DynamicFieldType}->{Name} - ID $DynamicFieldID",
);
Expand Down Expand Up @@ -448,7 +447,7 @@ $Selenium->RunTest(
State => 'Valid',
UserID => 1,
);
$Self->True(
ok(
$Success,
"TickedID $Tickets[0]->{ID} and $Tickets[1]->{ID} linked as parent-child"
);
Expand All @@ -463,7 +462,7 @@ $Selenium->RunTest(
State => 'Valid',
UserID => 1,
);
$Self->True(
ok(
$Success,
"TickedID $Tickets[2]->{ID} and $Tickets[1]->{ID} linked as parent-child"
);
Expand Down Expand Up @@ -974,7 +973,7 @@ $Selenium->RunTest(
}

# Close AgentTicketPrint PDF pop up window and switch window.
$Selenium->close();
$Selenium->close;
$Selenium->switch_to_window( $Handles->[0] );
$Selenium->WaitFor( WindowCount => 1 );

Expand Down Expand Up @@ -1034,7 +1033,7 @@ $Selenium->RunTest(
UserID => 1,
);
}
$Self->True(
ok(
$Success,
"TicketID $Ticket->{ID} is deleted",
);
Expand All @@ -1047,7 +1046,7 @@ $Selenium->RunTest(
ID => $DynamicFieldID,
UserID => 1,
);
$Self->True(
ok(
$Success,
"DynamicField ID $DynamicFieldID is deleted",
);
Expand Down Expand Up @@ -1098,7 +1097,7 @@ $Selenium->RunTest(
SQL => $Item->{SQL},
Bind => [ \$Item->{Bind} ],
);
$Self->True(
ok(
$Success,
$Item->{Message},
);
Expand Down

0 comments on commit 8743766

Please sign in to comment.