From 1dd593de44af9f30366227928e2464ae405802c5 Mon Sep 17 00:00:00 2001 From: Victor Grousset/tuxayo Date: Fri, 12 Jan 2024 01:54:16 +0100 Subject: [PATCH] Bug 35506: sabotage checkouts.js to reproduce flacky tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit == test plan == 1. apply this patch 2. prove t/db_dependent/selenium/regressions.t 3 . ↓↓↓↓ you get the two failures t/db_dependent/selenium/regressions.t .. 4/8 # at t/db_dependent/selenium/regressions.t line 204. # got: '' # expected: '1' [...] Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 325. --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index bebe986679..3bcea4a2d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -271,12 +271,19 @@ $(document).ready(function() { } barcodefield.focus(); }); + + setTimeout( function () { + $('#issues-table-load-now-button').click(function(){ if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); LoadIssuesTable(); barcodefield.focus(); return false; }); + console.log("show checkouts handler attached") + + } + ,2000); if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { if ( LoadCheckoutsTableDelay ) { -- 2.43.0