Skip to content

Commit

Permalink
Fixed SeleniumTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasSchmitt committed Oct 11, 2023
1 parent 89b8fea commit e0db755
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
8 changes: 5 additions & 3 deletions scripts/test/Selenium/Agent/AgentValidateCKEditor.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ $Selenium->RunTest(
sub {

my $HelperObject = $Kernel::OM->Get('Kernel::System::UnitTest::Helper');
my $QueueObject = $Kernel::OM->Get('Kernel::System::Queue');
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');

# Create test queue.
my $QueueID = $Kernel::OM->Get('Kernel::System::Queue')->QueueAdd(
my $QueueID = $QueueObject->QueueAdd(
Name => "Queue" . $HelperObject->GetRandomID(),
ValidID => 1,
GroupID => 1,
Expand All @@ -45,7 +47,7 @@ $Selenium->RunTest(
Password => $TestUserLogin,
);

my $ScriptAlias = $Kernel::OM->Get('Kernel::Config')->Get('ScriptAlias');
my $ScriptAlias = $ConfigObject->Get('ScriptAlias');

# Navigate to AgentTicketPhone screen.
$Selenium->VerifiedGet("${ScriptAlias}index.pl?Action=AgentTicketPhone");
Expand All @@ -63,7 +65,7 @@ $Selenium->RunTest(
# After JQuery update, invalid RichText field draws focus,
# so dropdown don't stay open. See bug#14997.
# Queue dropdown should stay open.
sleep 1;
sleep 2;

$Self->Is(
$Selenium->execute_script(
Expand Down
8 changes: 0 additions & 8 deletions var/httpd/htdocs/js/Core.UI.RichTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,6 @@ Core.UI.RichTextEditor = (function (TargetNS) {
};
/* eslint-enable no-unused-vars */

// Needed for clientside validation of RTE
CKEDITOR.instances[EditorID].on('blur', function () {
CKEDITOR.instances[EditorID].updateElement();
if (!$EditorArea.hasClass('Error')) {
Core.Form.Validate.ValidateElement($EditorArea);
}
});

// needed for client-side validation
CKEDITOR.instances[EditorID].on('focus', function () {

Expand Down

0 comments on commit e0db755

Please sign in to comment.