Koha/t/lib
Jonathan Druart a51b46d4ba
Bug 36916: Do not generate invalid JS or CSS from TestBuilder
TestBuilder generates random strings for branches.opacuserjs and branches.opacusercss which produces invalid JS and CSS.

Selenium has several warnings related to this:

koha-selenium-1   | JavaScript error: http://koha:8080/cgi-bin/koha/opac-user.pl, line 1744: ReferenceError: CLYxPjQ152 is not defined
koha-selenium-1   | JavaScript error: http://koha:8080/cgi-bin/koha/opac-search.pl, line 2069: ReferenceError: CLYxPjQ152 is not defined
koha-selenium-1   | JavaScript error: http://koha:8080/cgi-bin/koha/opac-reserve.pl, line 1351: ReferenceError: CLYxPjQ152 is not defined

Because of the following in the DOM
    <script>
        CLYxPjQ152
    </script>

This patch suggests to set to an empty string by default, to prevent random failure or inconsistent behaviours when testing the UI.

Test plan:
Run t/db_dependent/selenium/authentication.t and watch the selenium
output.
With this patch applied you will not see the "JavaScript error" lines

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-24 15:36:44 +02:00
..
bad_plugins/Koha/Plugin
IdP
Koha/BackgroundJob
Mocks
plugins/Koha/Plugin Bug 36503: Move and update unit test 2024-05-10 14:11:53 +02:00
QA
Bootstrap.pm
Dates.pm
Mocks.pm
Selenium.pm
TestBuilder.pm Bug 36916: Do not generate invalid JS or CSS from TestBuilder 2024-05-24 15:36:44 +02:00