]> git.koha-community.org Git - koha.git/commit
Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 10 May 2024 08:33:26 +0000 (10:33 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 10 May 2024 13:19:11 +0000 (15:19 +0200)
commitd5e20a832158d59a7f375d43de50f0839b63843c
tree0a009859ec1b10af5d0a0252369442901312a899
parente75e59d8561f247f2f58c514f7dbe50d40d9fe01
Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly

Removing this JS code from document.ready.
The script tag is at the end of the DOM and there is no good reasons (at
least I didn't find any) to wait for the whole document to be ready
before executing the JS code.

It made the selenium tests selenium/system_preferences_search.t to fail
randomly with:
    #   Failed test 'The first "Policy" section (under "Accounting") is currently expanded'
    #   at t/db_dependent/selenium/system_preferences_search.t line 63.
    #          got: undef
    #     expected: 'expanded'
    # Looks like you failed 1 test of 6.

Because we set the class in this JS code and selenium won't wait for it
to finish before starting running the tests.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js