From 4b9b4ed921bacd112a4abc321306ed17e0a8e99f Mon Sep 17 00:00:00 2001 From: bernhard Date: Thu, 17 Mar 2022 15:03:48 +0100 Subject: [PATCH] Issue #7: fixed test script headers RegisterDriver is needed in the test framework --- scripts/test/Console/Command/Admin/FAQ/Import.t | 13 +++++++++++-- .../Console/Command/Maint/FAQ/ContentTypeSet.t | 12 ++++++++++-- .../DynamicField/ObjectType/FAQ/ObjectDataGet.t | 14 ++++++++++---- scripts/test/FAQ.t | 14 ++++++++++---- scripts/test/FAQ/Category/AgentCategorySearch.t | 13 +++++++++++-- scripts/test/FAQ/Category/CategoryAdd.t | 12 ++++++++++-- .../FAQ/Category/CheckCategoryUserPermission.t | 14 ++++++++++---- scripts/test/FAQ/RelatedArticle.t | 14 ++++++++++---- scripts/test/FAQ/UpgradeLowerThan5092.t | 12 ++++++++++-- scripts/test/FAQSearch.t | 14 ++++++++++---- scripts/test/FAQSearch/InConditionGet.t | 14 ++++++++++---- scripts/test/GenericInterface/FAQConnector.t | 14 +++++++++++--- scripts/test/Selenium/Agent/AgentFAQAdd.t | 14 ++++++++++---- scripts/test/Selenium/Agent/AgentFAQCategory.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQDelete.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQEdit.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQExplorer.t | 14 ++++++++++---- scripts/test/Selenium/Agent/AgentFAQHistory.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQJournal.t | 1 + scripts/test/Selenium/Agent/AgentFAQLanguage.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQLinkObject.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQPrint.t | 16 +++++++++++----- scripts/test/Selenium/Agent/AgentFAQSearch.t | 15 +++++++++++---- scripts/test/Selenium/Agent/AgentFAQZoom.t | 15 +++++++++++---- .../test/Selenium/Agent/FAQ/RelatedArticles.t | 15 +++++++++++---- .../test/Selenium/Customer/CustomerFAQExplorer.t | 15 +++++++++++---- .../test/Selenium/Customer/CustomerFAQPrint.t | 15 ++++++++++----- .../test/Selenium/Customer/CustomerFAQSearch.t | 14 ++++++++++---- scripts/test/Selenium/Customer/CustomerFAQZoom.t | 15 +++++++++++---- .../test/Selenium/Customer/FAQ/RelatedArticles.t | 15 +++++++++++---- scripts/test/Selenium/Output/Dashboard/FAQ.t | 15 +++++++++++---- .../Selenium/Output/FAQJournalOverview/Small.t | 14 ++++++++++---- scripts/test/Selenium/Output/FAQMenu/Generic.t | 14 ++++++++++---- scripts/test/Selenium/Output/FAQOverview/Small.t | 14 ++++++++++---- .../Selenium/Output/HeaderMeta/AgentFAQSearch.t | 14 ++++++++++---- .../Output/HeaderMeta/CustomerFAQSearch.t | 14 ++++++++++---- .../Selenium/Output/HeaderMeta/PublicFAQSearch.t | 16 +++++++++++----- scripts/test/Selenium/Output/LinkObject/FAQ.t | 15 +++++++++++---- scripts/test/Selenium/Public/PublicFAQExplorer.t | 12 +++++++++--- scripts/test/Selenium/Public/PublicFAQPrint.t | 14 ++++++++++---- scripts/test/Selenium/Public/PublicFAQRSS.t | 14 ++++++++++---- scripts/test/Selenium/Public/PublicFAQSearch.t | 14 ++++++++++---- scripts/test/Selenium/Public/PublicFAQZoom.t | 14 ++++++++++---- 43 files changed, 439 insertions(+), 159 deletions(-) diff --git a/scripts/test/Console/Command/Admin/FAQ/Import.t b/scripts/test/Console/Command/Admin/FAQ/Import.t index ef32461..7690be8 100644 --- a/scripts/test/Console/Command/Admin/FAQ/Import.t +++ b/scripts/test/Console/Command/Admin/FAQ/Import.t @@ -14,11 +14,20 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars (qw($Self)); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get needed objects $Kernel::OM->ObjectParamAdd( @@ -51,4 +60,4 @@ $Self->Is( # cleanup is done by restore database -1; +$Self->DoneTesting(); diff --git a/scripts/test/Console/Command/Maint/FAQ/ContentTypeSet.t b/scripts/test/Console/Command/Maint/FAQ/ContentTypeSet.t index 6680c70..d803e60 100644 --- a/scripts/test/Console/Command/Maint/FAQ/ContentTypeSet.t +++ b/scripts/test/Console/Command/Maint/FAQ/ContentTypeSet.t @@ -14,11 +14,19 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars (qw($Self)); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; my $CommandObject = $Kernel::OM->Get('Kernel::System::Console::Command::Maint::FAQ::ContentTypeSet'); @@ -36,4 +44,4 @@ $Self->Is( "Kernel::System::Console::Command::Maint::FAQ::ContentTypeSet exit code", ); -1; +$Self->DoneTesting(); diff --git a/scripts/test/DynamicField/ObjectType/FAQ/ObjectDataGet.t b/scripts/test/DynamicField/ObjectType/FAQ/ObjectDataGet.t index a3c8451..7db86ca 100644 --- a/scripts/test/DynamicField/ObjectType/FAQ/ObjectDataGet.t +++ b/scripts/test/DynamicField/ObjectType/FAQ/ObjectDataGet.t @@ -14,11 +14,19 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars (qw($Self)); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; # Get helper object $Kernel::OM->ObjectParamAdd( @@ -156,6 +164,4 @@ continue { ); } -# cleanup is done by RestoreDatabase - -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQ.t b/scripts/test/FAQ.t index a295590..502850e 100644 --- a/scripts/test/FAQ.t +++ b/scripts/test/FAQ.t @@ -14,10 +14,18 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; # get needed objects $Kernel::OM->ObjectParamAdd( @@ -1143,6 +1151,4 @@ $Self->Is( "FAQCount() with multiple Categories success" ); -# cleanup is done by restore database - -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQ/Category/AgentCategorySearch.t b/scripts/test/FAQ/Category/AgentCategorySearch.t index 6e59efa..5a32b44 100644 --- a/scripts/test/FAQ/Category/AgentCategorySearch.t +++ b/scripts/test/FAQ/Category/AgentCategorySearch.t @@ -14,10 +14,18 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; $Kernel::OM->ObjectParamAdd( 'Kernel::System::UnitTest::Helper' => { @@ -300,4 +308,5 @@ for my $Test (@Tests) { } } -1; + +$Self->DoneTesting(); diff --git a/scripts/test/FAQ/Category/CategoryAdd.t b/scripts/test/FAQ/Category/CategoryAdd.t index 1fc219e..0ba6ca6 100644 --- a/scripts/test/FAQ/Category/CategoryAdd.t +++ b/scripts/test/FAQ/Category/CategoryAdd.t @@ -14,11 +14,19 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; # get needed objects $Kernel::OM->ObjectParamAdd( @@ -187,4 +195,4 @@ for my $ParentCount ( 1 .. 10 ) { $AddedCategoryIDs{$CategoryID} = 1; } -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQ/Category/CheckCategoryUserPermission.t b/scripts/test/FAQ/Category/CheckCategoryUserPermission.t index 578934f..77c2d1a 100644 --- a/scripts/test/FAQ/Category/CheckCategoryUserPermission.t +++ b/scripts/test/FAQ/Category/CheckCategoryUserPermission.t @@ -14,10 +14,18 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; $Kernel::OM->ObjectParamAdd( 'Kernel::System::UnitTest::Helper' => { @@ -204,6 +212,4 @@ continue { ); } -# cleanup is done by restore database - -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQ/RelatedArticle.t b/scripts/test/FAQ/RelatedArticle.t index acb32db..4cd5860 100644 --- a/scripts/test/FAQ/RelatedArticle.t +++ b/scripts/test/FAQ/RelatedArticle.t @@ -14,10 +14,18 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; $Kernel::OM->ObjectParamAdd( 'Kernel::System::UnitTest::Helper' => { @@ -855,6 +863,4 @@ continue { $TestCount++; } -# cleanup is done by restore database - -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQ/UpgradeLowerThan5092.t b/scripts/test/FAQ/UpgradeLowerThan5092.t index e87c753..c819bb4 100644 --- a/scripts/test/FAQ/UpgradeLowerThan5092.t +++ b/scripts/test/FAQ/UpgradeLowerThan5092.t @@ -14,13 +14,21 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; +# core modules use List::Util qw(); -use vars qw($Self); + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM use var::packagesetup::FAQ; +our $Self; + my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); my $SysConfigObject = $Kernel::OM->Get('Kernel::System::SysConfig'); @@ -300,4 +308,4 @@ $Self->True( 'Restored default configuration' ); -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQSearch.t b/scripts/test/FAQSearch.t index bf49fd7..70bc41e 100644 --- a/scripts/test/FAQSearch.t +++ b/scripts/test/FAQSearch.t @@ -14,10 +14,18 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; -use vars qw($Self); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; # get helper object $Kernel::OM->ObjectParamAdd( @@ -1182,6 +1190,4 @@ $Self->True( } } -# cleanup is done by restore database - -1; +$Self->DoneTesting(); diff --git a/scripts/test/FAQSearch/InConditionGet.t b/scripts/test/FAQSearch/InConditionGet.t index 3b0e8f7..f95e180 100644 --- a/scripts/test/FAQSearch/InConditionGet.t +++ b/scripts/test/FAQSearch/InConditionGet.t @@ -14,11 +14,19 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars (qw($Self)); +# core modules + +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM + +our $Self; # get helper object $Kernel::OM->ObjectParamAdd( @@ -82,6 +90,4 @@ for my $Test (@Tests) { ); } -# cleanup is done by RestoreDatabase. - -1; +$Self->DoneTesting(); diff --git a/scripts/test/GenericInterface/FAQConnector.t b/scripts/test/GenericInterface/FAQConnector.t index de469e3..924efa7 100644 --- a/scripts/test/GenericInterface/FAQConnector.t +++ b/scripts/test/GenericInterface/FAQConnector.t @@ -14,20 +14,28 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -use vars (qw($Self)); +# core modules use Socket; -use YAML; use MIME::Base64; + +# CPAN modules +use YAML; + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM use Kernel::GenericInterface::Debugger; use Kernel::GenericInterface::Operation::FAQ::LanguageList; use Kernel::GenericInterface::Operation::FAQ::PublicCategoryList; use Kernel::GenericInterface::Operation::FAQ::PublicFAQSearch; use Kernel::GenericInterface::Operation::FAQ::PublicFAQGet; +our $Self; + # get helper object my $HelperObject = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); @@ -917,4 +925,4 @@ $Self->True( "CategoryDelete() - Category: $CategoryIDOne", ); -1; +$Self->DoneTesting(); diff --git a/scripts/test/Selenium/Agent/AgentFAQAdd.t b/scripts/test/Selenium/Agent/AgentFAQAdd.t index 2d26fac..6b0c060 100644 --- a/scripts/test/Selenium/Agent/AgentFAQAdd.t +++ b/scripts/test/Selenium/Agent/AgentFAQAdd.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQCategory.t b/scripts/test/Selenium/Agent/AgentFAQCategory.t index c1255c6..72fd53f 100644 --- a/scripts/test/Selenium/Agent/AgentFAQCategory.t +++ b/scripts/test/Selenium/Agent/AgentFAQCategory.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQDelete.t b/scripts/test/Selenium/Agent/AgentFAQDelete.t index 1e0bc62..d2a7192 100644 --- a/scripts/test/Selenium/Agent/AgentFAQDelete.t +++ b/scripts/test/Selenium/Agent/AgentFAQDelete.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQEdit.t b/scripts/test/Selenium/Agent/AgentFAQEdit.t index a7b8d8c..6869145 100644 --- a/scripts/test/Selenium/Agent/AgentFAQEdit.t +++ b/scripts/test/Selenium/Agent/AgentFAQEdit.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQExplorer.t b/scripts/test/Selenium/Agent/AgentFAQExplorer.t index 6b6abcd..12df81f 100644 --- a/scripts/test/Selenium/Agent/AgentFAQExplorer.t +++ b/scripts/test/Selenium/Agent/AgentFAQExplorer.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQHistory.t b/scripts/test/Selenium/Agent/AgentFAQHistory.t index 9d1c1f5..cfa89b2 100644 --- a/scripts/test/Selenium/Agent/AgentFAQHistory.t +++ b/scripts/test/Selenium/Agent/AgentFAQHistory.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQJournal.t b/scripts/test/Selenium/Agent/AgentFAQJournal.t index e367ec2..8afe49c 100644 --- a/scripts/test/Selenium/Agent/AgentFAQJournal.t +++ b/scripts/test/Selenium/Agent/AgentFAQJournal.t @@ -14,6 +14,7 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; diff --git a/scripts/test/Selenium/Agent/AgentFAQLanguage.t b/scripts/test/Selenium/Agent/AgentFAQLanguage.t index 2df6310..6c1a77f 100644 --- a/scripts/test/Selenium/Agent/AgentFAQLanguage.t +++ b/scripts/test/Selenium/Agent/AgentFAQLanguage.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQLinkObject.t b/scripts/test/Selenium/Agent/AgentFAQLinkObject.t index 6c279fe..0aee35a 100644 --- a/scripts/test/Selenium/Agent/AgentFAQLinkObject.t +++ b/scripts/test/Selenium/Agent/AgentFAQLinkObject.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQPrint.t b/scripts/test/Selenium/Agent/AgentFAQPrint.t index a356535..3d25146 100644 --- a/scripts/test/Selenium/Agent/AgentFAQPrint.t +++ b/scripts/test/Selenium/Agent/AgentFAQPrint.t @@ -14,23 +14,29 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); if ( !$Selenium->{browser_name} || $Selenium->{browser_name} ne 'firefox' ) { $Self->True( 1, 'PDF test currently supports Firefox only, skipping test' ); - ##return 1; } else { $Selenium->RunTest( diff --git a/scripts/test/Selenium/Agent/AgentFAQSearch.t b/scripts/test/Selenium/Agent/AgentFAQSearch.t index 7816232..0bbb42d 100644 --- a/scripts/test/Selenium/Agent/AgentFAQSearch.t +++ b/scripts/test/Selenium/Agent/AgentFAQSearch.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/AgentFAQZoom.t b/scripts/test/Selenium/Agent/AgentFAQZoom.t index f3508e5..ee73502 100644 --- a/scripts/test/Selenium/Agent/AgentFAQZoom.t +++ b/scripts/test/Selenium/Agent/AgentFAQZoom.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Agent/FAQ/RelatedArticles.t b/scripts/test/Selenium/Agent/FAQ/RelatedArticles.t index 90db04e..fe15a9d 100644 --- a/scripts/test/Selenium/Agent/FAQ/RelatedArticles.t +++ b/scripts/test/Selenium/Agent/FAQ/RelatedArticles.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Customer/CustomerFAQExplorer.t b/scripts/test/Selenium/Customer/CustomerFAQExplorer.t index b799cac..069acc1 100644 --- a/scripts/test/Selenium/Customer/CustomerFAQExplorer.t +++ b/scripts/test/Selenium/Customer/CustomerFAQExplorer.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Customer/CustomerFAQPrint.t b/scripts/test/Selenium/Customer/CustomerFAQPrint.t index 51885bb..87b98e3 100644 --- a/scripts/test/Selenium/Customer/CustomerFAQPrint.t +++ b/scripts/test/Selenium/Customer/CustomerFAQPrint.t @@ -14,24 +14,29 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); if ( !$Selenium->{browser_name} || $Selenium->{browser_name} ne 'firefox' ) { $Self->True( 1, 'PDF test currently supports Firefox only, skipping test' ); - ##return 1; } else { $Selenium->RunTest( diff --git a/scripts/test/Selenium/Customer/CustomerFAQSearch.t b/scripts/test/Selenium/Customer/CustomerFAQSearch.t index 10a4657..50abb08 100644 --- a/scripts/test/Selenium/Customer/CustomerFAQSearch.t +++ b/scripts/test/Selenium/Customer/CustomerFAQSearch.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Customer/CustomerFAQZoom.t b/scripts/test/Selenium/Customer/CustomerFAQZoom.t index c8f4cd6..3100109 100644 --- a/scripts/test/Selenium/Customer/CustomerFAQZoom.t +++ b/scripts/test/Selenium/Customer/CustomerFAQZoom.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Customer/FAQ/RelatedArticles.t b/scripts/test/Selenium/Customer/FAQ/RelatedArticles.t index 558c86a..5a3a19b 100644 --- a/scripts/test/Selenium/Customer/FAQ/RelatedArticles.t +++ b/scripts/test/Selenium/Customer/FAQ/RelatedArticles.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/Dashboard/FAQ.t b/scripts/test/Selenium/Output/Dashboard/FAQ.t index e3a9359..dd6291d 100644 --- a/scripts/test/Selenium/Output/Dashboard/FAQ.t +++ b/scripts/test/Selenium/Output/Dashboard/FAQ.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/FAQJournalOverview/Small.t b/scripts/test/Selenium/Output/FAQJournalOverview/Small.t index 5e3f291..d34facd 100644 --- a/scripts/test/Selenium/Output/FAQJournalOverview/Small.t +++ b/scripts/test/Selenium/Output/FAQJournalOverview/Small.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/FAQMenu/Generic.t b/scripts/test/Selenium/Output/FAQMenu/Generic.t index 541a8f5..89cf33b 100644 --- a/scripts/test/Selenium/Output/FAQMenu/Generic.t +++ b/scripts/test/Selenium/Output/FAQMenu/Generic.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/FAQOverview/Small.t b/scripts/test/Selenium/Output/FAQOverview/Small.t index 6ebf5e5..af5d44d 100644 --- a/scripts/test/Selenium/Output/FAQOverview/Small.t +++ b/scripts/test/Selenium/Output/FAQOverview/Small.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/HeaderMeta/AgentFAQSearch.t b/scripts/test/Selenium/Output/HeaderMeta/AgentFAQSearch.t index c0fc96a..9eb64d6 100644 --- a/scripts/test/Selenium/Output/HeaderMeta/AgentFAQSearch.t +++ b/scripts/test/Selenium/Output/HeaderMeta/AgentFAQSearch.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/HeaderMeta/CustomerFAQSearch.t b/scripts/test/Selenium/Output/HeaderMeta/CustomerFAQSearch.t index e4d9f07..dd8e8b1 100644 --- a/scripts/test/Selenium/Output/HeaderMeta/CustomerFAQSearch.t +++ b/scripts/test/Selenium/Output/HeaderMeta/CustomerFAQSearch.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Output/HeaderMeta/PublicFAQSearch.t b/scripts/test/Selenium/Output/HeaderMeta/PublicFAQSearch.t index 84e0faf..85901e1 100644 --- a/scripts/test/Selenium/Output/HeaderMeta/PublicFAQSearch.t +++ b/scripts/test/Selenium/Output/HeaderMeta/PublicFAQSearch.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { @@ -84,7 +90,7 @@ $Selenium->RunTest( "Test FAQ item is deleted - ID $ItemID", ); - # make sure the cache is correct + # Make sure the cache is correct. $Kernel::OM->Get('Kernel::System::Cache')->CleanUp( Type => "FAQ" ); } ); diff --git a/scripts/test/Selenium/Output/LinkObject/FAQ.t b/scripts/test/Selenium/Output/LinkObject/FAQ.t index 45d0819..4d23aa4 100644 --- a/scripts/test/Selenium/Output/LinkObject/FAQ.t +++ b/scripts/test/Selenium/Output/LinkObject/FAQ.t @@ -14,16 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; + +# get selenium object +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Public/PublicFAQExplorer.t b/scripts/test/Selenium/Public/PublicFAQExplorer.t index 11fee5e..66e7889 100644 --- a/scripts/test/Selenium/Public/PublicFAQExplorer.t +++ b/scripts/test/Selenium/Public/PublicFAQExplorer.t @@ -14,14 +14,20 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); diff --git a/scripts/test/Selenium/Public/PublicFAQPrint.t b/scripts/test/Selenium/Public/PublicFAQPrint.t index b0bb28a..05adb42 100644 --- a/scripts/test/Selenium/Public/PublicFAQPrint.t +++ b/scripts/test/Selenium/Public/PublicFAQPrint.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); if ( !$Selenium->{browser_name} || $Selenium->{browser_name} ne 'firefox' ) { $Self->True( diff --git a/scripts/test/Selenium/Public/PublicFAQRSS.t b/scripts/test/Selenium/Public/PublicFAQRSS.t index 5a8c595..1a5bdb0 100644 --- a/scripts/test/Selenium/Public/PublicFAQRSS.t +++ b/scripts/test/Selenium/Public/PublicFAQRSS.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Public/PublicFAQSearch.t b/scripts/test/Selenium/Public/PublicFAQSearch.t index 56cc57f..a4412cc 100644 --- a/scripts/test/Selenium/Public/PublicFAQSearch.t +++ b/scripts/test/Selenium/Public/PublicFAQSearch.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub { diff --git a/scripts/test/Selenium/Public/PublicFAQZoom.t b/scripts/test/Selenium/Public/PublicFAQZoom.t index 0d1efcc..966b331 100644 --- a/scripts/test/Selenium/Public/PublicFAQZoom.t +++ b/scripts/test/Selenium/Public/PublicFAQZoom.t @@ -14,17 +14,23 @@ # along with this program. If not, see . # -- +use v5.24; use strict; use warnings; use utf8; -# Set up the test driver $Self when we are running as a standalone script. -use Kernel::System::UnitTest::RegisterDriver; +# core modules -use vars (qw($Self)); +# CPAN modules + +# OTOBO modules +use Kernel::System::UnitTest::RegisterDriver; # Set up $Self and $Kernel::OM +use Kernel::System::UnitTest::Selenium; + +our $Self; # get selenium object -my $Selenium = $Kernel::OM->Get('Kernel::System::UnitTest::Selenium'); +my $Selenium = Kernel::System::UnitTest::Selenium->new( LogExecuteCommandActive => 1 ); $Selenium->RunTest( sub {