Summary: | system_preferences_search.t is failing randomly | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00
|
|
Circulation function: | |||
Bug Depends on: | 32926 | ||
Bug Blocks: | 25551 | ||
Attachments: |
Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly
Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly Bug 34655: (QA follow-up) Tidy the file |
Description
Jonathan Druart
2023-08-30 12:48:11 UTC
(In reply to Jonathan Druart from comment #0) > 21:54:14 koha_1 | # Failed test 'The first "Policy" section > (under "Accounting") is currently expanded' > 21:54:14 koha_1 | # at > t/db_dependent/selenium/system_preferences_search.t line 63. > 21:54:14 koha_1 | # got: undef > 21:54:14 koha_1 | # expected: 'expanded' > 21:54:14 koha_1 | # Looks like you failed 1 test of 6. > 21:54:14 koha_1 | > 21:54:14 koha_1 | # Failed test 'Perform a system preferences search > for "log", and try to expand/collapse both "Policy" sections that appear' > 21:54:14 koha_1 | # at > t/db_dependent/selenium/system_preferences_search.t line 91. This was Koha_Master/2625 It just failed again on yesterday's run #2771: koha_1 | koha_1 | # Failed test 'The first "Policy" section (under "Accounting") is currently expanded' koha_1 | # at t/db_dependent/selenium/system_preferences_search.t line 63. koha_1 | # got: undef koha_1 | # expected: 'expanded' koha_1 | # Looks like you failed 1 test of 6. koha_1 | koha_1 | # Failed test 'Perform a system preferences search for "log", and try to expand/collapse both "Policy" sections that appear' koha_1 | # at t/db_dependent/selenium/system_preferences_search.t line 91. koha_1 | # Looks like you failed 1 test of 1. koha_1 | [18:44:17] t/db_dependent/selenium/system_preferences_search.t ......................... koha_1 | Dubious, test returned 1 (wstat 256, 0x100) koha_1 | Failed 1/1 subtests Koha_Master/2818 Created attachment 166509 [details] [review] Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly Removing this JS code from document.ready. The script tag is at the end of the DOM and there is no good reasons (at least I didn't find any) to wait for the whole document to be ready before executing the JS code. It made the selenium tests selenium/system_preferences_search.t to fail randomly with: # Failed test 'The first "Policy" section (under "Accounting") is currently expanded' # at t/db_dependent/selenium/system_preferences_search.t line 63. # got: undef # expected: 'expanded' # Looks like you failed 1 test of 6. Because we set the class in this JS code and selenium won't wait for it to finish before starting running the tests. Created attachment 166517 [details] [review] Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly Removing this JS code from document.ready. The script tag is at the end of the DOM and there is no good reasons (at least I didn't find any) to wait for the whole document to be ready before executing the JS code. It made the selenium tests selenium/system_preferences_search.t to fail randomly with: # Failed test 'The first "Policy" section (under "Accounting") is currently expanded' # at t/db_dependent/selenium/system_preferences_search.t line 63. # got: undef # expected: 'expanded' # Looks like you failed 1 test of 6. Because we set the class in this JS code and selenium won't wait for it to finish before starting running the tests. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. Start up KTD with selenium: ktd --selenium up 2. Tests fail before the patch, and pass after the patch: prove t/db_dependent/selenium/system_preferences_search.t Created attachment 166543 [details] [review] Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly Removing this JS code from document.ready. The script tag is at the end of the DOM and there is no good reasons (at least I didn't find any) to wait for the whole document to be ready before executing the JS code. It made the selenium tests selenium/system_preferences_search.t to fail randomly with: # Failed test 'The first "Policy" section (under "Accounting") is currently expanded' # at t/db_dependent/selenium/system_preferences_search.t line 63. # got: undef # expected: 'expanded' # Looks like you failed 1 test of 6. Because we set the class in this JS code and selenium won't wait for it to finish before starting running the tests. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 166544 [details] [review] Bug 34655: (QA follow-up) Tidy the file As we're already updating whitespace over almost the entire file, we may as well go and tidy the whole thing too and add the /* keep tidy */ flag. (I checked for conflicts with existing bugs.. there's bug 20930 which will need a rebase, but it will already conflict and need a rebase and is currently FQA) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I'm not finding any regressions here.. all seems to work.. time will tell ;P Passing QA Pushed for 24.05! Well done everyone, thank you! Does not apply easy on 23.11.x I prefer not to backport Fixes tests, no changes to the manual required. |