Bug 33263 - selenium/patrons_search.t is failing randomly
Summary: selenium/patrons_search.t is failing randomly
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 29971
Blocks: 25551
  Show dependency treegraph
 
Reported: 2023-03-17 10:56 UTC by Jonathan Druart
Modified: 2023-12-28 20:44 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04
Circulation function:


Attachments
Bug 33263: Fix random failure in patrons_search.t (1.04 KB, patch)
2023-03-17 10:58 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-03-17 10:56:28 UTC
21:02:22 koha_1       | STRACE:	/usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 
21:02:22 koha_1       | 	/usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
21:02:22 koha_1       | 	(eval 544):1 in Selenium::Remote::Driver::__ANON__
21:02:22 koha_1       | 	(eval 546):2 in Selenium::Remote::Driver::__ANON__
21:02:22 koha_1       | 	(eval 518):17 in Selenium::Remote::Driver::_execute_command
21:02:22 koha_1       | 	/usr/share/perl5/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command
21:02:22 koha_1       | 	t/db_dependent/selenium/patrons_search.t:305 in Selenium::Remote::WebElement::click
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
21:02:22 koha_1       | 	t/db_dependent/selenium/patrons_search.t:329 in Test::More::subtest
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
21:02:22 koha_1       | 	/usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
21:02:22 koha_1       | 	t/db_dependent/selenium/patrons_search.t:340 in Test::More::subtest
21:02:22 koha_1       | 
21:02:22 selenium_1   | 1678996938891	Marionette	INFO	Stopped listening on port 46123
21:02:22 selenium_1   | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
21:02:22 selenium_1   | 20:02:19.387 INFO [ActiveSessions$1.onStop] - Removing session 271bae1c-da93-47f1-8ae7-3192cd7be69e (org.openqa.selenium.firefox.GeckoDriverService)
21:02:22 koha_1       |         # Looks like you planned 7 tests but ran 3.
21:02:22 koha_1       | 
21:02:22 koha_1       |     #   Failed test 'remember_search'
21:02:22 koha_1       |     #   at t/db_dependent/selenium/patrons_search.t line 329.
21:02:22 koha_1       |     # Looks like you failed 1 test of 25.
21:02:22 koha_1       | 
21:02:22 koha_1       | #   Failed test 'Search patrons'
21:02:22 koha_1       | #   at t/db_dependent/selenium/patrons_search.t line 340.
21:02:22 koha_1       | Error while executing command: stale element reference: The element reference of <input id="check58" class="selection" name="borrowernumber" type="checkbox"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
21:02:22 koha_1       |  at /usr/share/perl5/Selenium/Remote/Driver.pm line 356.
21:02:22 koha_1       | # Looks like your test exited with 255 just after 1.
21:02:22 koha_1       | [20:02:19] t/db_dependent/selenium/patrons_search.t
Comment 1 Jonathan Druart 2023-03-17 10:56:47 UTC
This is different than bug 31199.
Comment 2 Jonathan Druart 2023-03-17 10:58:35 UTC
Created attachment 148324 [details] [review]
Bug 33263: Fix random failure in patrons_search.t

There is a missing wait_for_ajax. After we click "next", we need to make
sure we are using the correct response.
Comment 3 Jonathan Druart 2023-03-17 10:58:53 UTC
Koha_Master/2428
Comment 4 Tomás Cohen Arazi (tcohen) 2023-03-17 13:00:21 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-03-17 17:21:14 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 6 Lucas Gass (lukeg) 2023-04-21 16:49:35 UTC
Doesn't apply clean to 22.05.x, needs rebase