From 5c76ad78a3d5c9d485a7884deb2fe39834fb880c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 7 Oct 2019 12:08:36 +0100 Subject: [PATCH] Bug 18084: (RM follow-up) Fix authentication tests A change to the way we hide/expose the user menu in the opac resulted in the authentication selenium tests failing. This was due to the logout button being identified as hidden under the new code and as such the logout action not being triggered correctly between each login test. The was was simply to add an additonal 'click' event called on the menu button to put the logout link into the visible viewport. Signed-off-by: Martin Renvoize --- t/db_dependent/selenium/authentication.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/db_dependent/selenium/authentication.t b/t/db_dependent/selenium/authentication.t index b3738a561d..4b8ae3c960 100644 --- a/t/db_dependent/selenium/authentication.t +++ b/t/db_dependent/selenium/authentication.t @@ -92,6 +92,7 @@ SKIP: { $driver->find_element('//div[@id="userdetails"]'); like( $driver->get_title, qr(Your library home), 'Patron without permissions should be able to login to the OPAC using the modal'); + $driver->find_element('//a[@id="user-menu"]')->click; $driver->find_element('//a[@id="logout"]')->click; $driver->find_element('//div[@id="login"]'); # logged out @@ -101,6 +102,7 @@ SKIP: { $driver->find_element('//div[@id="userdetails"]'); like( $driver->get_title, qr(Your library home), 'Patron without permissions should be able to login to the OPAC using the form on the right'); + $driver->find_element('//a[@id="user-menu"]')->click; $driver->find_element('//a[@id="logout"]')->click; $driver->find_element('//div[@id="login"]'); # logged out @@ -111,6 +113,7 @@ SKIP: { $driver->find_element('//div[@id="userdetails"]'); like( $driver->get_title, qr(Your library home), 'Patron with catalogue permission should be able to login to the OPAC'); + $driver->find_element('//a[@id="user-menu"]')->click; $driver->find_element('//a[@id="logout"]')->click; $driver->find_element('//div[@id="login"]'); # logged out @@ -120,6 +123,7 @@ SKIP: { $driver->find_element('//div[@id="userdetails"]'); like( $driver->get_title, qr(Your library home), 'Patron with superlibrarian permission should be able to login to the OPAC'); + $driver->find_element('//a[@id="user-menu"]')->click; $driver->find_element('//a[@id="logout"]')->click; $driver->find_element('//div[@id="login"]'); # logged out -- 2.20.1