From 7a2efb285d7fa83e3af332becc13e28b224839c1 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 18 Sep 2009 18:36:46 +0200 Subject: [PATCH] Adding selenium tests for filterMembers --- selenium/KohaTests | 2 + selenium/Members/filter_members | 82 ++++++++++++++++++++++++++ selenium/PERL/Members/FilterMembers.pl | 30 ++++++++++ 3 files changed, 114 insertions(+) create mode 100644 selenium/Members/filter_members create mode 100644 selenium/PERL/Members/FilterMembers.pl diff --git a/selenium/KohaTests b/selenium/KohaTests index 9c5ba199a1..91f4c34cf6 100644 --- a/selenium/KohaTests +++ b/selenium/KohaTests @@ -11,6 +11,8 @@ Enregistrement Lecteur Recherche Lecteur DeletMember +EditMember +filter_members diff --git a/selenium/Members/filter_members b/selenium/Members/filter_members new file mode 100644 index 0000000000..9372cc0618 --- /dev/null +++ b/selenium/Members/filter_members @@ -0,0 +1,82 @@ + + + + + + +filter_members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
filter_members
open/cgi-bin/koha/mainpage.pl
clickAndWait//div[@id='yui-main']/div/div/div[1]/h3[2]/a
clickAndWaitlink=C
assertElementPresentmemberresultst
selectbranchcodelabel=Bibliothèque de Luminy
clickAndWait//div[@id='bd']/div[2]/form/input[3]
assertElementPresentmemberresultst
selectcategorycodelabel=Etudiant niveau M
clickAndWait//div[@id='bd']/div[2]/form/input[3]
assertElementPresentmemberresultst
type//input[@name='member' and @value='']cas
clickAndWait//div[@id='bd']/div[2]/form/input[3]
assertElementPresentmemberresultst
+ + diff --git a/selenium/PERL/Members/FilterMembers.pl b/selenium/PERL/Members/FilterMembers.pl new file mode 100644 index 0000000000..2c5cb6d237 --- /dev/null +++ b/selenium/PERL/Members/FilterMembers.pl @@ -0,0 +1,30 @@ +use strict; +use warnings; +use Time::HiRes qw(sleep); +use Test::WWW::Selenium; +use Test::More "no_plan"; +use Test::Exception; + +my $sel = Test::WWW::Selenium->new( host => "localhost", + port => 4444, + browser => "*chrome", + browser_url => "http://change-this-to-the-site-you-are-testing/" ); + +$sel->open_ok("/cgi-bin/koha/mainpage.pl"); +$sel->click_ok("//div[\@id='yui-main']/div/div/div[1]/h3[2]/a"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->click_ok("link=C"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->is_element_present_ok("memberresultst"); +$sel->select_ok("branchcode", "label=Bibliothèque de Luminy"); +$sel->click_ok("//div[\@id='bd']/div[2]/form/input[3]"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->is_element_present_ok("memberresultst"); +$sel->select_ok("categorycode", "label=Etudiant niveau M"); +$sel->click_ok("//div[\@id='bd']/div[2]/form/input[3]"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->is_element_present_ok("memberresultst"); +$sel->type_ok("//input[\@name='member' and \@value='']", "cas"); +$sel->click_ok("//div[\@id='bd']/div[2]/form/input[3]"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->is_element_present_ok("memberresultst"); -- 2.39.5