From bf32471053fe86d909d6c7857d38f265285b5482 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. Signed-off-by: Tomas Cohen Arazi --- 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 09953927d9..132fbc04d0 100755 --- a/t/db_dependent/selenium/basic_workflow.t +++ b/t/db_dependent/selenium/basic_workflow.t @@ -227,6 +227,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.39.2