Bugzilla – Attachment 73320 Details for
Bug 20045
Switch single-column templates to Bootstrap grid: Various
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20045: Fix Selenium tests
Bug-20045-Fix-Selenium-tests.patch (text/plain), 4.48 KB, created by
Jonathan Druart
on 2018-03-27 15:06:21 UTC
(
hide
)
Description:
Bug 20045: Fix Selenium tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-03-27 15:06:21 UTC
Size:
4.48 KB
patch
obsolete
>From 1c47f767b526e7e7d6873f81900d9896b7770f73 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Mar 2018 12:03:51 -0300 >Subject: [PATCH] Bug 20045: Fix Selenium tests > >Element id=doc does not longer exist on the admin home page >The "main block" need to be localized using the new class 'main >container-fluid' >We will certainly need to improve this later. >--- > t/db_dependent/selenium/administration_tasks.t | 12 ++++++------ > t/lib/Selenium.pm | 2 ++ > 2 files changed, 8 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/selenium/administration_tasks.t b/t/db_dependent/selenium/administration_tasks.t >index 6cb97dcd12..4e4f518485 100644 >--- a/t/db_dependent/selenium/administration_tasks.t >+++ b/t/db_dependent/selenium/administration_tasks.t >@@ -52,7 +52,7 @@ SKIP: { > # Navigate to the Administration area and create an item type > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ) > ; # Koha administration >- $s->click( { href => '/admin/itemtypes.pl', main => 'doc' } ); # Item Types >+ $s->click( { href => '/admin/itemtypes.pl', main_class => 'main container-fluid' } ); # Item Types > $s->click( { href => '/admin/itemtypes.pl?op=add_form', main => 'doc3' } ) > ; # New item type > $s->fill_form( >@@ -70,7 +70,7 @@ SKIP: { > $driver->get($mainpage); > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ) > ; # Koha administration >- $s->click( { href => '/admin/smart-rules.pl', main => 'doc' } ) >+ $s->click( { href => '/admin/smart-rules.pl', main_class => 'main container-fluid' } ) > ; # Circulation and fines rules > # TODO Create smart navigation here > }; >@@ -79,7 +79,7 @@ SKIP: { > $driver->get($mainpage); > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ) > ; # Koha administration >- $s->click( { href => '/admin/biblio_framework.pl', main => 'doc' } ) >+ $s->click( { href => '/admin/biblio_framework.pl', main_class => 'main container-fluid' } ) > ; # MARC bibliographic framework > $s->click( > { href => '/admin/biblio_framework.pl?op=add_form', main => 'doc3' } ) >@@ -105,7 +105,7 @@ SKIP: { > $driver->get($mainpage); > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ) > ; # Koha administration >- $s->click( { href => '/admin/branches.pl', main => 'doc' } ) >+ $s->click( { href => '/admin/branches.pl', main_class => 'main container-fluid' } ) > ; # Libraries and groups > $s->click( { href => '/admin/branches.pl?op=add_form', main => 'doc3' } ) > ; # New library >@@ -130,7 +130,7 @@ SKIP: { > $driver->get($mainpage); > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); #Koha administration > >- $s->click( { href => '/admin/authorised_values.pl', main => 'doc' } ); #Authorized values >+ $s->click( { href => '/admin/authorised_values.pl', main_class => 'main container-fluid' } ); #Authorized values > > $s->click( { href => { 'ends-with' => '/admin/authorised_values.pl?op=add_form' }, main => 'doc3' } ); # New category > $s->fill_form( { category => $av_category } ); >@@ -166,7 +166,7 @@ SKIP: { > { # Patron categories > $driver->get($mainpage); > $s->click( { href => '/admin/admin-home.pl', main => 'container-main' } ); # Koha administration >- $s->click( { href => '/admin/categories.pl', main => 'doc' } ); # Patron categories >+ $s->click( { href => '/admin/categories.pl', main_class => 'main container-fluid' } ); # Patron categories > $s->click( { href => '/admin/categories.pl?op=add_form', main => 'doc3' } ); # New patron category > > $s->fill_form( { categorycode => $category_code, description => 'Test category', enrolmentperiod => 12, category_type => 'A' } ); >diff --git a/t/lib/Selenium.pm b/t/lib/Selenium.pm >index 6741f62d32..1ddab54e59 100644 >--- a/t/lib/Selenium.pm >+++ b/t/lib/Selenium.pm >@@ -97,6 +97,8 @@ sub click { > my $xpath_selector; > if ( exists $params->{main} ) { > $xpath_selector = '//div[@id="'.$params->{main}.'"]'; >+ } elsif ( exists $params->{main_class} ) { >+ $xpath_selector = '//div[@class="'.$params->{main_class}.'"]'; > } > if ( exists $params->{href} ) { > if ( ref( $params->{href} ) ) { >-- >2.11.0
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 20045
:
70760
|
72509
|
72621
|
73240
| 73320