-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix new failures in unit tests #3931
Comments
As far as I'm aware, the new failures are EditFieldRender and AdminQueueTemplates, correct? |
I can't really tell. My last run was from 2024-09-30. It had some more failing scripts. But this was before the patches done for #3856. So it might be that the current failures are not actually new. |
See also #3980 where a test failure for rel-11_1 was fixed. |
findings re HumanReadableDataSize.t (I was looking at nightly build pipeline errors earlier) short: looks like fun with Unicode long: possible Problem with Translation data in Kernel/Language/ar_SA.pm, looks like since rel-10_1 (human readable size translations for 10_0 are empty) looking at Kernel/Language/ar_SA.pm line 4993ff I see this
No clue regarding proper Unicode representation for Arabic, but for whatever reason the tranlation line for MB looks way different then all the others. Perhaps a copy/paste error thing? Technically, it manages to break the string subst (%s) feature of Translate(). Ah, the power of Unicode!. Sigh. Trying to massage the test data ... |
re HumanReadableDataSize.t this would apparently fix it (in the sense of making the test green, probably needs proof-reading):
|
Please talk with @stefanhaerter and @KhalilHamada-OTOBO - this has to do with the translations we automatically deploy via weblate, and there was an issue with exactly that. At least for one branch, I believe they fixed it by Khalil correcting the translation on weblate. (Edit: maybe for other branches the test was already changed, I'm not sure. They both worked on this, in any case.) |
The failure in EditFieldRender.t seems to be related to the sorting of options, that is whether the empty option is added on top or on bottom. However, I can't tell what the correct behavior is. Here is the unified diff that was generated by hacking
|
The failure in HumanReadableDataSize.t showed up in rel-10_1 as well. I cherry picked the patch. |
After converting EditFieldRender.t to using
|
Here is the latest run in rel-11_0. Looks like the failures in AdminQueueTemplates.t are sporadic.
|
For the failures in AgentTicketOwner.t and AgentTicketZoom.t there already is #3563 . |
Re EditFieldRender.t possibly related: #3719 |
New failure in WebserviceTicketInvoker.t in the latest run:
|
After some fixes the list of failing tests, this time for rel-11_1, is:
@stefanhaerter : I recall that you had some more fixes, but I could not find the patch any more. |
After a couple of fixes:
AdminQueueTemplates.t might be sporadic |
Running the test suite with rel-11_0 under Docker again and we are down to a single failure:
|
This looks suspiciously related to my work in #3982 - I will try to have a look anytime soon. |
@stefanhaerter # Add one additional response header line.
$Selenium->find_element( "#AddValue", 'css' )->click();
but the DOM looks like: <a href="#" id="OutboundHeadersAddValue" class="CallForAction AddValue"><span><i class="fa fa-plus-square"> </i>Add header</span></a> Perhaps change |
remaining unittest failure scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t in rel-11_1 (test is green in rel-11_0): otobo@b3d4b0a8eb28:~$ bin/otobo.Console.pl Dev::UnitTest::Run scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t
[11:27:53] scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t .. 46/?
# Failed test 'Signing key is selected'
# at scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t line 276.
[11:27:53] scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t .. 51/?
# Failed test 'Signing key is selected'
# at scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t line 321.
gpg: WARNING: unsafe permissions on homedir '/opt/otobo/var/tmp/pgptest3060000847400000'
[11:27:53] scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t .. 86/? # Seeded srand with seed '20250110' from local date.
# Looks like you failed 2 tests of 92.
[11:27:53] scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/92 subtests
[11:28:12]
Test Summary Report
-------------------
scripts/test/Selenium/Agent/Admin/AgentTicketEmailPGP.t (Wstat: 512 (exited 2) Tests: 92 Failed: 2)
Failed tests: 50, 55
Non-zero exit status: 2
Files=1, Tests=92, 19 wallclock secs ( 0.10 usr 0.01 sys + 2.72 cusr 0.59 csys = 3.42 CPU)
Result: FAIL
ran tests for product OTOBO 11.1.x on host b3d4b0a8eb28 .
Steps to reproduce (sigh):
Test Scenario 1 (works):
{"NewUserID":[["","-",false,false,false]],"NewResponsibleID":[["","-",false,false,false]],"SignKeyID":[["","-",false,false,false],["PGP::2AD6BAFF","PGP: [good] 2AD6BAFF [never] John Smith (Test PGP never expired) <[email protected]>",true,true,false],["PGP::667B04B9","PGP: [WARNING: EXPIRED KEY] 667B04B9 [2018-12-19] John Smith (Test PGP expired) <pgptest@exampl[...]",false,false,false]],"NextStateID":[["2","closed successful",false,false,false],["3","closed unsuccessful",false,false,false],["4","open",true,true,false],["7","pending auto close+",false,false,false],["8","pending auto close-",false,false,false],["6","pending reminder",false,false,false]],"EmailSecurityOptions":[["","-",false,false,false],["PGP::-::Encrypt","PGP encrypt",false,false,false],["PGP::Sign::-","PGP sign",true,true,false],["PGP::Sign::Encrypt","PGP sign and encrypt",false,false,false]],"TypeID":[["","-",false,false,false],["1","Unclassified",false,false,false]],"Signature":"<br/>Your Ticket-Team<br/><br/> - -<br/><br/>--<br/> Super Support - Waterford Business Park<br/> 5201 Blue Lagoon Drive - 8th Floor & 9th Floor - Miami, 33126 USA<br/> Email: [email protected] - Web: <a href=\"http://www.example.com/\" title=\"http://www.example.com/\">http://www.example.com/</a><br/>--","Dest":[["","-",false,false,false],["3||Junk","Junk",false,false,false],["4||Misc","Misc",false,false,false],["7||PgpTest","PgpTest",true,true,false],["1||Postmaster","Postmaster",false,false,false],["2||Raw","Raw",false,false,false]],"SLAID":[["","-",false,false,false]],"StandardTemplateID":[["","-",false,false,false]],"CryptKeyID":[["","-",false,false,false]],"ServiceID":[["","-",false,false,false]],"PriorityID":[["1","1 very low",false,false,false],["2","2 low",false,false,false],["3","3 normal",true,true,false],["4","4 high",false,false,false],["5","5 very high",false,false,false]]} Test Scenario 2 - fails as in the unittest:
{} But why?Looking at AgentTicketCompose in rel-11_1, the JSON for AJAXUpdate is built like this: my %Diversity = reverse %Uniformity;
for my $Field ( sort keys %StdFieldValues ) {
push @StdFieldAJAX, {
Name => $Diversity{$Field} || $Field,
Data => $StdFieldValues{$Field},
SelectedID => $GetParam{$Field},
%{ $Attributes{$Field} },
};
}
my $JSON = $LayoutObject->BuildSelectionJSON(
[
@StdFieldAJAX,
@DynamicFieldAJAX,
],
); So, the JSON for standard fields comes from the %StdFieldValues hash. It seems that this hash gets declared in https://github.com/RotherOSS/otobo/blob/rel-11_1/Kernel/Modules/AgentTicketCompose.pm#L1353 - and then never gets assigned to before the end of 'AJAXUpdate'. That would explain the empty JSON array, unless I am overlooking something ... but ... Hu? |
Most likely related: #3537 |
Current state of the tests.
|
A couple of new test failures have crept into rel-11_0:
The text was updated successfully, but these errors were encountered: