Bug 37748: Adjust the 'Update child to patron' selenium test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-08-28 13:59:15 +02:00 committed by Katrin Fischer
parent b57868b1e4
commit 5b63d200a8
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -138,9 +138,9 @@ subtest 'Update child to patron' => sub {
$driver->get( $base_url . "/members/moremember.pl?borrowernumber=$adult_borrowernumber" ); $driver->get( $base_url . "/members/moremember.pl?borrowernumber=$adult_borrowernumber" );
$driver->find_element('//div[@id="toolbar"]/div[@class="btn-group"][last()]')->click; # More button group $driver->find_element('//div[@id="toolbar"]/div[@class="btn-group"][last()]')->click; # More button group
my $update_link = $driver->find_element('//a[@id="updatechild"]'); my $update_li = $driver->find_element('//a[@id="updatechild"]/..');
is($update_link->get_attribute('data-bs-toggle', 1), 'tooltip', q|The update link should have a data-bs-toggle attribute => it's a tooltip, not clickable|); is($update_li->get_attribute('data-bs-toggle', 1), 'tooltip', q|The parent of the update link should have a data-bs-toggle attribute => it's a tooltip, not clickable|);
$update_link->click; $update_li->click;
like( $driver->get_current_url, qr{/members/moremember\.pl\?borrowernumber=$adult_borrowernumber$}, 'After clicking the link, nothing happens, no # in the URL'); like( $driver->get_current_url, qr{/members/moremember\.pl\?borrowernumber=$adult_borrowernumber$}, 'After clicking the link, nothing happens, no # in the URL');
}; };