Bug 39745 - Wrong system preference 'language' in test suite
Summary: Wrong system preference 'language' in test suite
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on: 27490
Blocks: 39720
  Show dependency treegraph
 
Reported: 2025-04-25 09:05 UTC by Fridolin Somers
Modified: 2025-05-06 17:58 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes several tests so that the correct system preference names are used: - language => StaffInterfaceLanguages (name changed in bug 27490) - opaclanguages => OPACLanguages (name now uses the correct case)
Version(s) released in:
Circulation function:


Attachments
Bug 39745: Wrong system preference 'language' in test suite (2.10 KB, patch)
2025-04-25 09:09 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 39745: Fix wrong system preference 'language' in test suite (selenium) (2.12 KB, patch)
2025-04-25 09:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference) (2.63 KB, patch)
2025-04-25 09:47 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 39745: Fix wrong system preference 'language' in test suite (selenium) (2.17 KB, patch)
2025-04-25 18:32 UTC, David Nind
Details | Diff | Splinter Review
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference) (2.68 KB, patch)
2025-04-25 18:32 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2025-04-25 09:05:25 UTC
Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite selenium tests.
Comment 1 Fridolin Somers 2025-04-25 09:09:28 UTC
Created attachment 181494 [details] [review]
Bug 39745: Wrong system preference 'language' in test suite

Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite selenium tests.

Also fixes 'opaclanguages' case to 'OPACLanguages'
just to match the file installer/data/mysql/mandatory/sysprefs.sql

Test by running selenium tests onboarding and installation
Comment 2 Fridolin Somers 2025-04-25 09:43:21 UTC
Created attachment 181498 [details] [review]
Bug 39745: Fix wrong system preference 'language' in test suite (selenium)

Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite selenium tests.

Also fixes 'opaclanguages' case to 'OPACLanguages'
just to match the file installer/data/mysql/mandatory/sysprefs.sql

Test by running selenium tests onboarding and installation
Comment 3 Fridolin Somers 2025-04-25 09:47:37 UTC
Created attachment 181499 [details] [review]
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)

Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite on mock_preference calls

Test by running impacted tests
Comment 4 David Nind 2025-04-25 18:32:01 UTC
Created attachment 181551 [details] [review]
Bug 39745: Fix wrong system preference 'language' in test suite (selenium)

Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite selenium tests.

Also fixes 'opaclanguages' case to 'OPACLanguages'
just to match the file installer/data/mysql/mandatory/sysprefs.sql

Test by running selenium tests onboarding and installation

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-04-25 18:32:04 UTC
Created attachment 181552 [details] [review]
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)

Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite on mock_preference calls

Test by running impacted tests

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-04-25 18:39:08 UTC
Testing notes (using KTD):

1. Start up KTD with Selenium: ktd --selenium up
2. Run these test - they should pass before and after the patches:
   prove t/db_dependent/selenium/00-onboarding.t 
   prove t/db_dependent/selenium/01-installation.t
   prove t/db_dependent/Auth.t 
   prove t/db_dependent/Koha/ItemTypes.t 
   prove t/db_dependent/Koha/SharedContent.t
Comment 7 Katrin Fischer 2025-05-06 17:58:45 UTC
I have some confusing problem with selenium, not pushing this yet, leaving for a fresher set of eyes.

Running tests (5)
	* Proving /kohadevbox/koha/t/db_dependent/Koha/SharedContent.t OK!
	* Proving /kohadevbox/koha/t/db_dependent/selenium/01-installation.t KO!

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 397):1 in Selenium::Remote::Driver::__ANON__
	(eval 399):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)
	/kohadevbox/koha/t/lib/Selenium.pm:121 in Selenium::Remote::Driver::find_element
	/kohadevbox/koha/t/db_dependent/selenium/01-installation.t:93 in t::lib::Selenium::fill_form

 Error while executing command: no such element: Unable to locate element: //*[@id="language"] 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 before it could output anything.
 /kohadevbox/koha/t/db_dependent/selenium/01-installation.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/2 subtests 
 
Test Summary Report
-------------------
 /kohadevbox/koha/t/db_dependent/selenium/01-installation.t (Wstat: 65280 (exited 255) Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 0.
Files=1, Tests=0, 15 wallclock secs ( 0.01 usr  0.00 sys +  0.77 cusr  0.07 csys =  0.85 CPU)
 Result: FAIL

	* Proving /kohadevbox/koha/t/db_dependent/Koha/ItemTypes.t OK!
	* Proving /kohadevbox/koha/t/db_dependent/Auth.t OK!
	* Proving /kohadevbox/koha/t/db_dependent/selenium/00-onboarding.t KO!

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 397):1 in Selenium::Remote::Driver::__ANON__
	(eval 399):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)
	/kohadevbox/koha/t/lib/Selenium.pm:121 in Selenium::Remote::Driver::find_element
	/kohadevbox/koha/t/db_dependent/selenium/00-onboarding.t:92 in t::lib::Selenium::fill_form

 Error while executing command: no such element: Unable to locate element: //*[@id="language"] 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 before it could output anything.
 /kohadevbox/koha/t/db_dependent/selenium/00-onboarding.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/2 subtests 

Test Summary Report
-------------------
 /kohadevbox/koha/t/db_dependent/selenium/00-onboarding.t (Wstat: 65280 (exited 255) Tests: 0 Failed: 0)
  Non-zero exit status: 255
   Parse errors: Bad plan.  You planned 2 tests but ran 0.
Files=1, Tests=0, 13 wallclock secs ( 0.01 usr  0.00 sys +  0.77 cusr  0.06 csys =  0.84 CPU)
 Result: FAIL