From be52d015cf55d66e6b1a122804211fda56cda023 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Jul 2022 07:47:20 +0100 Subject: [PATCH] Bug 25449: (QA follow-up) Fix basic_workflow.t Now that we have made item.itype a required field, we need to ensure we set it for the corresponding selenium test.. this wasn't entirely easy as the html select is hidden by select2. I had to find the select2 span, trigger a click event to open it and then find and click an option. --- t/db_dependent/selenium/basic_workflow.t | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/db_dependent/selenium/basic_workflow.t b/t/db_dependent/selenium/basic_workflow.t index de44740828..b2c3e23ef1 100755 --- a/t/db_dependent/selenium/basic_workflow.t +++ b/t/db_dependent/selenium/basic_workflow.t @@ -220,6 +220,13 @@ SKIP: { $effective_input->send_keys( $v ); } + # Find itemtype select2 and open it + my $itype_select = $driver->find_element('//*[@id="subfield952y"]/span[1]'); + $itype_select->click; + # Select an itemtype + my $options = $driver->find_elements('.select2-results__option', 'css'); + @$options[0]->click; + $driver->find_element('//input[@name="add_submit"]')->click; like( $driver->get_title(), qr(Items.*Record #$biblionumber) ); -- 2.20.1