Bugzilla – Attachment 91001 Details for
Bug 5287
Add floating toolbar to search results in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5287: (RM follow-up) Make tests basket compatible
Bug-5287-RM-follow-up-Make-tests-basket-compatible.patch (text/plain), 2.13 KB, created by
Martin Renvoize (ashimema)
on 2019-06-25 15:23:36 UTC
(
hide
)
Description:
Bug 5287: (RM follow-up) Make tests basket compatible
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-06-25 15:23:36 UTC
Size:
2.13 KB
patch
obsolete
>From 90bd9763bd0cf49df722955008af0c59d79edfe0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 25 Jun 2019 16:19:43 +0100 >Subject: [PATCH] Bug 5287: (RM follow-up) Make tests basket compatible > >The selenium tests for addtobasket/removefrombasket started to fail >after the introduction of bug 5287. It turns out that a selenium click >handler will trigger a scroll event if the element you're trying to >click isn't in the view port. Unfortunately it scrolls the viewport just >enough for the element to come on screen but that also triggers the >floating toolbar in this case which ends up floating directly over the >element we want to 'click' and so the click rightfully fails as the >element is not 'clickable'. > >This patch works around the issue by setting the window size to being a >HD screen in portrait orientation and therefore negates the need for >scrolling to put the elements in within the viewport. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/selenium/regressions.t | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/t/db_dependent/selenium/regressions.t b/t/db_dependent/selenium/regressions.t >index ad1a6ed6ac..090ae2d68e 100644 >--- a/t/db_dependent/selenium/regressions.t >+++ b/t/db_dependent/selenium/regressions.t >@@ -70,6 +70,10 @@ subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub { > > subtest 'OPAC - Remove from cart' => sub { > plan tests => 4; >+ >+ # We need to prevent scrolling to prevent the floating toolbar from overlapping buttons we are testing >+ my $window_size = $driver->get_window_size(); >+ $driver->set_window_size(1920,1080); > > $driver->get( $opac_base_url . "opac-search.pl?q=d" ); > >@@ -99,6 +103,9 @@ subtest 'OPAC - Remove from cart' => sub { > $basket_count_elt = $driver->find_element('//span[@id="basketcount"]/span'); > is( $basket_count_elt->get_text(), > 2, '1 element should have been removed from the cart' ); >+ >+ # Reset window size >+ $driver->set_window_size($window_size->{'height'}, $window_size->{'width'}); > }; > > subtest 'Play sound on the circulation page' => sub { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5287
:
90503
|
90504
|
90513
|
90514
|
90700
|
90701
|
90952
|
90953
| 91001