Summary: | TestBuilder generates incorrect JS and CSS for libraries | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | RESOLVED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, m.de.rooy |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.06
|
|
Circulation function: | |||
Bug Depends on: | 32721 | ||
Bug Blocks: | |||
Attachments: |
Bug 36916: Do not generate invalid JS or CSS from TestBuilder
Bug 36916: Do not generate invalid JS or CSS from TestBuilder Bug 36916: Do not generate invalid JS or CSS from TestBuilder |
Description
Jonathan Druart
2024-05-22 08:30:34 UTC
Created attachment 167011 [details] [review] 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 Created attachment 167055 [details] [review] 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> Created attachment 167161 [details] [review] 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> Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.06 Missing 23,05.x dependencies, no backport |