Bug 33211 - Fix failing test for basic_workflow.t when adding item
Summary: Fix failing test for basic_workflow.t when adding item
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-13 14:38 UTC by Nick Clemens (kidclamp)
Modified: 2024-07-04 20:40 UTC (History)
5 users (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,22.05.12,21.11.20
Circulation function:


Attachments
Bug 33211: Fix failing test (1.19 KB, patch)
2023-03-13 14:39 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33211: Fix failing test (1.25 KB, patch)
2023-03-13 14:42 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-03-13 14:38:50 UTC
It seems something changed and the selector is no longer findable

STRACE:	/usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 
	/usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
	(eval 1840):1 in Selenium::Remote::Driver::__ANON__
	(eval 1842):2 in Selenium::Remote::Driver::__ANON__
	/usr/share/perl5/Selenium/Remote/Driver.pm:1340 in Selenium::Remote::Driver::_execute_command
	/usr/share/perl5/Selenium/Remote/Driver.pm:1340 in (eval)
	t/db_dependent/selenium/basic_workflow.t:207 in Selenium::Remote::Driver::find_element

Error while executing command: no such element: Unable to locate element: //div[@id="subfield952w"]/input[@class="input_marceditor flatpickr-input"] at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
 at /usr/share/perl5/Selenium/Remote/Driver.pm line 356.
# Looks like your test exited with 255 just after 6.
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 16/22 subtests 

Test Summary Report
-------------------
t/db_dependent/selenium/basic_workflow.t (Wstat: 65280 Tests: 6 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 22 tests but ran 6.
Comment 1 Nick Clemens (kidclamp) 2023-03-13 14:39:42 UTC
Created attachment 148121 [details] [review]
Bug 33211: Fix failing test

This patch updates the selector to use the full class and find the text
type as well
Comment 2 Tomás Cohen Arazi (tcohen) 2023-03-13 14:42:16 UTC
Created attachment 148122 [details] [review]
Bug 33211: Fix failing test

This patch updates the selector to use the full class and find the text
type as well

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2023-03-13 14:43:28 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 4 Martin Renvoize (ashimema) 2023-03-14 07:23:51 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 5 Lucas Gass (lukeg) 2023-04-14 16:51:10 UTC
Backported to 22.05.x for upcoming 22.05.12
Comment 6 Arthur Suzuki 2023-04-20 09:12:12 UTC
applied to 21.11.x for 21.11.20
Comment 7 Wainui Witika-Park 2023-04-27 05:58:17 UTC
Not backported to 21.05.x
Comment 8 Jonathan Druart 2023-11-29 10:32:08 UTC
(In reply to Tomás Cohen Arazi from comment #2)
> Created attachment 148122 [details] [review] [review]
> Bug 33211: Fix failing test
> 
> This patch updates the selector to use the full class and find the text
> type as well
> 
> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

This patch actually makes a test fail under 22.05

A revert fixes the basic_workflow

Error while executing command: no such element: Unable to locate element: //div[@id="subfield952w"]/input[@type="text" and @class="input_marceditor items.replacementpricedate noEnterSubmit flatpickr-input"] at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
Comment 9 Jonathan Druart 2023-11-29 10:35:19 UTC
Pushed in April... Is this test failing since April??