summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagappan <nagappan>2005-08-02 14:23:38 +0000
committernagappan <nagappan>2005-08-02 14:23:38 +0000
commit0c6f749159414df31f66904c7a012618aa70d379 (patch)
treed22649bf3599df8cc29b03b7ff3000503a366565
parent2e5b283072d55105f5a3d6316fe4242603353504 (diff)
Updated new sanity scripts for Evolution calendar 2.3.5
-rw-r--r--evolution/create-appointment.dat10
-rw-r--r--evolution/create-appointment.py101
-rw-r--r--evolution/create-calendar.dat6
-rw-r--r--evolution/create-calendar.py83
-rw-r--r--evolution/evoutils/calendar.py129
-rw-r--r--evolution/verify-appointment.py120
-rw-r--r--evolution/verify-meeting.py122
7 files changed, 571 insertions, 0 deletions
diff --git a/evolution/create-appointment.dat b/evolution/create-appointment.dat
new file mode 100644
index 0000000..64505eb
--- /dev/null
+++ b/evolution/create-appointment.dat
@@ -0,0 +1,10 @@
+this is sample summary1
+this is sample location1
+this is sample description1
+$
+$
+$
+$
+$
+$
+$ \ No newline at end of file
diff --git a/evolution/create-appointment.py b/evolution/create-appointment.py
new file mode 100644
index 0000000..034a8e9
--- /dev/null
+++ b/evolution/create-appointment.py
@@ -0,0 +1,101 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prem <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#To create an Appointment
+
+#Reading inputs from file
+file = open ('create-appointment.dat','r')
+data = file.readlines ()
+summary = data[0].strip ()
+location = data[1].strip ()
+description = data[2].strip ()
+classification = data[3].strip ()
+categories = data[4].strip ()
+moncount = data[5].strip ()
+on = data[6].strip ()
+day = data[7].strip ()
+occurences = data[8].strip ()
+exception = data[9].strip ()
+
+#TODO: INCLUDE actual date values after fixing the problem in insert_appointment
+date0 = 0
+time0 = 0
+date1 = 0
+time1 = 0
+
+#setting up default values
+if classification == '$':
+ classification = 'Public'
+if categories == '$':
+ categories = 'Business'
+if moncount == '$':
+ moncount = '3'
+if on == '$':
+ on = 'First'
+if day == '$':
+ day = 'Monday'
+if occurences == '$':
+ occurences = '5'
+if exception =='$' or exception > occurences:
+ if exception > occurences:
+ log ('Setting exception to default value since given value is inappropriate', 'warning')
+ exception = 2
+
+#creation fo appointment
+log ('Appointment Creation', 'teststart')
+
+try:
+ windowname = 'dlgAppointment-Nosummary'
+ ptlistname = 'ptlAppointment-Nosummary0'
+ selectmenuitem ('evolution', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ selectmenuitem ('evolution', 'mnuFile;mnuFileNew;mnuAppointment')
+ time.sleep (2)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new appointment window', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ log ('Insertion of Appointment values', 'teststart')
+ insert_appointment (windowname, ptlistname, summary, location, description, date0,
+ time0, date1, time1, classification, categories)
+ log ('Insertion of Appointment values', 'testend')
+ time.sleep (2)
+ log ('Insertion of recurrence values', 'teststart')
+ insert_recurrence (windowname, ptlistname, moncount, on, day, occurences, exception)
+ log ('Insertion of recurrence values', 'testend')
+ time.sleep (2)
+ click (windowname , 'btnOK')
+ time.sleep (3)
+ log ('Ignore the following error message, Because of Guiexist usage', 'info')
+ if guiexist ('dlgAppointment-Nosummary') == 1:
+ log ('Failed to close appointment dialog' ,'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ releasecontext ()
+ log ('Appointment creation succeeded', 'pass')
+except error,msg:
+ releasecontext ()
+ print 'Creation of appointment failed' + str(msg)
+ log ('Creation of appointment failed', 'error')
+
+log ('Appointment Creation', 'testend')
diff --git a/evolution/create-calendar.dat b/evolution/create-calendar.dat
new file mode 100644
index 0000000..ab4951a
--- /dev/null
+++ b/evolution/create-calendar.dat
@@ -0,0 +1,6 @@
+Holidays
+webcal://ical.mac.com/ical/Indian32Holidays.ics
+1
+1
+$
+$ \ No newline at end of file
diff --git a/evolution/create-calendar.py b/evolution/create-calendar.py
new file mode 100644
index 0000000..973c8ff
--- /dev/null
+++ b/evolution/create-calendar.py
@@ -0,0 +1,83 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Prem <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#To create a Calendar
+
+#Reading inputs from file
+file = open ('create-calendar.dat','r')
+data = file.readlines ()
+name = data[0].strip ()
+url = data[1].strip ()
+check1 = data[2].strip ()
+check2 = data[3].strip ()
+timecount = data[4].strip ()
+timeunit = data[5].strip ()
+
+#creation fo meeting
+log ('Calendar Creation', 'teststart')
+try:
+ windowname = 'dlgNewCalendar'
+ selectmenuitem ('evolution', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ selectmenuitem ('evolution', 'mnuFile;mnuFileNew;mnuCalendar')
+ time.sleep (2)
+ if guiexist (windowname) == 0:
+ log ('Failed to open new calendar window', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if selectitem (windowname, 'cboOnThisComputer', 'On The Web') != 1:
+ log ('Unable to select \'on the web\' item', 'error')
+ raise LdtpExecutionError (0)
+ if setandverify (windowname, 'txt1', name) == 0:
+ log ('Unable to set calendar title', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if setandverify (windowname, 'txt0', url) == 0:
+ log ('Unable to set url', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if check1 == '1':
+ if check (windowname, 'chkCopycalendarcontentslocallyforofflineoperation') != 1:
+ log ('Unable to mark check box: Copy calendar contents ...', 'error')
+ if check2 == '1':
+ if check (windowname, 'chkMarkasdefaultfolder') != 1:
+ log ('Unable to mark check bos: Mark as default folder' ,'error')
+ if timecount != '$':
+ if setvalue (windowname, 'sbtn0', timecount) != 1:
+ log ('Unable to set time of refreshing', 'error')
+ if timeunit != '$':
+ if selectitem (windowname, 'cbominutes', timeunit) != 1:
+ log ('Unable to set combo box (refresh)', 'error')
+ click (windowname, 'btnOK')
+ time.sleep (2)
+ log ('Ignore the follwoing error message, Because of guiexist usage', 'info')
+ if guiexist (windowname) == 1:
+ log ('Failed to close new calendar dialog', 'error')
+ raise LdtpExecutionError (0)
+ else:
+ log ('Calendar creation', 'Pass')
+except error,msg:
+ print 'Creation of Calendar failed' + str(msg)
+ log ('Creation of Calendar failed', 'error')
+
+log ('Calendar Creation', 'testend')
diff --git a/evolution/evoutils/calendar.py b/evolution/evoutils/calendar.py
new file mode 100644
index 0000000..29130a7
--- /dev/null
+++ b/evolution/evoutils/calendar.py
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Premkumar <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+from ldtp import *
+from ldtputils import *
+from evoutils.mail import *
+
+#To insert values into an Recurrence tab
+def insert_recurrence (windowname, ptlistname, moncount = '3', on = 'First', day = 'Monday', occurences = '5',
+ exception = '2'):
+ try:
+ selecttab (windowname, ptlistname, '1')
+ time.sleep (2)
+ check (windowname, 'chkThisappointmentrecurs')
+ time.sleep(1)
+ #verifycheck (windowname, 'chkThisappointmentrecurs')
+ if stateenabled (windowname, 'btnAdd') == 0:
+ log ('Add button is not enabled', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ setvalue (windowname, 'sbtn0', moncount)
+ selectitem (windowname, 'cboday', 'month(s)')
+ time.sleep (2)
+ selectitem (windowname, 'cbo1st', on)
+ time.sleep (2)
+ selectitem (windowname, 'cboforever', 'for')
+ time.sleep (2)
+ setvalue (windowname, 'sbtn1', occurences)
+ time.sleep (2)
+ #TODO: After the bug regarding ADD buttons not working is fixed uncomment the following segment of code
+
+ #click (windowname, 'btnAdd')
+ #time.sleep (2)
+ #if guiexist ('dlgAddexception') == 0:
+ # log ('Failed to open exception add dialog', 'cause')
+ # raise LdtpExecutionError (0)
+ #else:
+ #TODO: Logic for calculating the exception date from the given exception number
+ #and creating an exception for the same
+ #no_of_months = moncount * exception
+ #time.sleep (1)
+
+ except error,msg:
+ print "Problem in inserting recurrence details " + str (msg)
+ log('errorinrecurrencetab','error')
+
+
+#To insert values into an Appointment tab
+def insert_appointment (windowname, ptlistname, summary, location, description, date0, time0,
+ date1, time1, classification = 'Public', categories = 'Business'):
+ try:
+ print 'windowname is: ' + windowname
+ print 'tablist name is: ' + ptlistname
+ selecttab (windowname, ptlistname, '0')
+ time.sleep (2)
+ settextvalue (windowname,'txt3', summary)
+ if windowname == 'dlgMeeting-Nosummary':
+ setcontext ('Meeting - No summary', 'Meeting - ' + summary)
+ else:
+ setcontext ('Appointment - No summary', 'Appointment - ' + summary)
+ time.sleep (2)
+ if setandverify (windowname, 'txt2', location) == 0:
+ log ('Failed to set value in location field', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ comboselect (windowname, 'cboPublic', classification)
+ #TODO: Use verifyselect to verify the previous operation. Currently could not do
+ #due to ambiguos
+
+ click (windowname, 'btnCategories')
+ time.sleep (3)
+ if guiexist ('dlgCategories') == 0:
+ log ('Failed to open categories dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ #NOTE: Here is a small work around for selecting the category because of unclear
+ #behaviour of the table in the category dialog.
+ index = gettablerowindex ('dlgCategories', 'tbl0', categories )
+ selectrowindex ('dlgCategories', 'tbl0', index + 1)
+ time.sleep (2)
+ checkrow ('dlgCategories', 'tbl0', index)
+ time.sleep (2)
+ if verifysettext ('dlgCategories', 'txt0', categories) == 0:
+ log ('Failed to select given category', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ click ('dlgCategories', 'btnOK')
+ time.sleep (1)
+ if guiexist ('dlgCategories') == 1:
+ log ('Failed to close Category dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if setandverify (windowname, 'txtEventDescription', description) == 0:
+ log ('Failed to set value in Event description field', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ check (windowname,'chkAlldayevent')
+
+ #FIXME: Because of appmap generating same label for both the date fields
+ #could not set date into first field
+ #settextvalue (windowname, 'txtTextDateEntry2', date0)
+ #settextvalue (windowname, 'txtTextDateEntry1', date1)
+
+ check ('dlgMeeting-Nosummary','chkAlarm')
+ except error,msg:
+ print "Problem in inserting appointment details " + str (msg)
+ log('errorinappointmenttab','error')
+
diff --git a/evolution/verify-appointment.py b/evolution/verify-appointment.py
new file mode 100644
index 0000000..ca9fc37
--- /dev/null
+++ b/evolution/verify-appointment.py
@@ -0,0 +1,120 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Sheetal <svnayak18@yahoo.com>
+# Prem <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#To create a Meeting
+
+#Reading inputs from file
+file = open ('create-appointment.dat','r')
+data = file.readlines ()
+summary = data[0].strip ()
+location = data[1].strip ()
+description = data[2].strip ()
+classification = data[3].strip ()
+categories = data[4].strip ()
+moncount = data[5].strip ()
+on = data[6].strip ()
+day = data[7].strip ()
+occurences = data[8].strip ()
+exception = data[9].strip ()
+
+#TODO: INCLUDE actual date values after fixing the problem in insert_appointment
+date0 = 0
+time0 = 0
+date1 = 0
+time1 = 0
+
+#setting up default values
+if classification == '$':
+ classification = 'Public'
+if categories == '$':
+ categories = 'Business'
+if moncount == '$':
+ moncount = '3'
+if on == '$':
+ on = 'First'
+if day == '$':
+ day = 'Monday'
+if occurences == '$':
+ occurences = '5'
+if exception =='$' or exception > occurences:
+ if exception > occurences:
+ log ('Setting exception to default value since given value is inappropriate', 'warning')
+ exception = 2
+
+#creation fo meeting
+log ('Appointment Verification', 'teststart')
+
+try:
+ if guiexist ('evolution') == 0:
+ log ('Evolution wondow not found', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ selectmenuitem ('evolution', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ #selectmenuitem ('evolution', 'mnuView;mnuCurrentView;mnuListView')
+ #time.sleep (2)
+ if selectrow ('evolution', 'tbl0', summary) == 0:
+ log ('Selection of table value failed', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (3)
+ typekey ('<ctrl>o')
+ time.sleep (2)
+ setcontext ('Appointment - No Summary', 'Appointment - '+summary)
+ time.sleep (2)
+ if guiexist ('dlgAppointment-Nosummary') == 0:
+ log ('Failed to open Corresponding Appointment dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ windowname = 'dlgAppointment-Nosummary'
+ ptlistname = 'ptlAppointment'
+ if verifysettext (windowname, 'txtLocation', location) == 0:
+ log ('Verification of location field failed', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if verifysettext (windowname, 'txt0', categories) == 0:
+ log ('Verification of category field failed', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ if verifysettext (windowname, 'txtEventDescription', description) == 0:
+ log ('Verification of description field failed', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ #TODO: Include verification of combo boxes and check boxes after the bugs in them
+ #are fixed
+ click (windowname, 'btnCancel')
+ time.sleep (2)
+ log ('Ignore the following error message, Because of Guiexist usage', 'info')
+ if guiexist (windowname) == 1:
+ log ('Failed to close Appointment Dialog', 'cause')
+ releasecontext ()
+ raise LdtpExecutionError (0)
+ else:
+ log ('Verification of Appointment Succeeded','Pass')
+ releasecontext ()
+except error,msg:
+ releasecontext ()
+ print 'Verification of Appointment failed' + str(msg)
+ log ('Verification of Appointment failed', 'error')
+
+log ('Appointment Verification', 'testend')
diff --git a/evolution/verify-meeting.py b/evolution/verify-meeting.py
new file mode 100644
index 0000000..d4becaa
--- /dev/null
+++ b/evolution/verify-meeting.py
@@ -0,0 +1,122 @@
+#
+# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp
+#
+# Author:
+# Sheetal <svnayak18@yahoo.com>
+# Prem <jpremkumar@novell.com>
+#
+# Copyright 2004 Novell, Inc.
+#
+# This test script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#To create a Meeting
+
+#Reading inputs from file
+file = open ('create-meeting.dat','r')
+data = file.readlines ()
+summary = data[0].strip ()
+location = data[1].strip ()
+description = data[2].strip ()
+classification = data[3].strip ()
+categories = data[4].strip ()
+moncount = data[5].strip ()
+on = data[6].strip ()
+day = data[7].strip ()
+occurences = data[8].strip ()
+exception = data[9].strip ()
+
+#TODO: INCLUDE actual date values after fixing the problem in insert_appointment
+date0 = 0
+time0 = 0
+date1 = 0
+time1 = 0
+
+#setting up default values
+if classification == '$':
+ classification = 'Public'
+if categories == '$':
+ categories = 'Business'
+if moncount == '$':
+ moncount = '3'
+if on == '$':
+ on = 'First'
+if day == '$':
+ day = 'Monday'
+if occurences == '$':
+ occurences = '5'
+if exception =='$' or exception > occurences:
+ if exception > occurences:
+ log ('Setting exception to default value since given value is inappropriate', 'warning')
+ exception = 2
+
+#creation fo meeting
+log ('Meeting Verification', 'teststart')
+
+try:
+ if guiexist ('evolution') == 0:
+ log ('Evolution window not found', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ selectmenuitem ('evolution', 'mnuView;mnuWindow;mnuCalendars')
+ time.sleep (2)
+ print 'Summary ' + summary
+ #selectmenuitem ('evolution', 'mnuView;mnuCurrentView;mnuListView')
+ #time.sleep (2)
+ if selectrow ('evolution', 'tbl0', summary) == 0:
+ log ('Selection of table value failed', 'cause')
+ raise LdtpExecutionError (0)
+ time.sleep (2)
+ print 'comes here'
+ time.sleep (3)
+ typekey ('<ctrl>o')
+ time.sleep (2)
+ setcontext ('Meeting - No Summary', 'Meeting - '+summary)
+ if guiexist ('dlgMeeting-Nosummary') == 0:
+ log ('Failed to open Corresponding meeting dialog', 'cause')
+ raise LdtpExecutionError (0)
+ else:
+ windowname = 'dlgMeeting-Nosummary'
+ ptlistname = 'ptlMeeting'
+ if verifysettext (windowname, 'txtLocation', location) == 0:
+ log ('Verification of location field failed', 'cause')
+ raise
+ else:
+ if verifysettext (windowname, 'txt0', categories) == 0:
+ log ('Verification of category field failed', 'cause')
+ raise
+ else:
+ if verifysettext (windowname, 'txtEventDescription', description) == 0:
+ log ('Verification of description field failed', 'cause')
+ raise
+ else:
+ #TODO: Include verification of combo boxes and check boxes after the bugs in them
+ #are fixed
+ click (windowname, 'btnCancel')
+ time.sleep (2)
+ log ('Ignore the following error message, Because of Guiexist usage', 'info')
+ if guiexist (windowname) == 1:
+ log ('Failed to close Meeting Dialog', 'cause')
+ releasecontext ()
+ raise LdtpExecutionError (0)
+ else:
+ log ('Verification of Meeting Succeded','Pass')
+ releasecontext ()
+except error,msg:
+ releasecontext ()
+ print 'Verification of meeting failed' + str(msg)
+ log ('Verification of meeting failed', 'error')
+
+log ('Meeting Verification', 'testend')