altered codew so deletes no longer tested jsclicker does not work on 2003 ass matt and dash to list of users to receive test report

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3581 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-02-15 13:03:02 +00:00
parent a2f19e13f6
commit 1d8de2873a
4 changed files with 77 additions and 76 deletions

View File

@@ -91,22 +91,23 @@ class Test_06_addon_screen < Test::Unit::TestCase
#
#Check that the LOGGER record can be deleted and that the record is no longer displayed in the report
#
def test_05_delete_addon
@@ie.link(:text, 'LOGGER').click
@@ie.wait
assert(@@ie.contains_text('Create/Edit Additional Item'),'The Create/Edit Additional Item screen did not appear')
assert(@@ie.text_field(:id, 'P24_CODE').verify_contains('LOGGER'), 'The additional item code field did not contain value LOGGER')
assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Data Logger'), 'The description is not logger')
assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('15'), 'Lead time is not 15')
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
startClicker("OK", 1)
@@ie.button(:id, 'delete').click
#@@ie.wait
assert_nil(@@ie.contains_text('LOGGER'),'The additional item record with code LOGGER appears on screen')
end
#Can't test delete due to the javascript pop-up
# def test_05_delete_addon
# @@ie.link(:text, 'LOGGER').click
# @@ie.wait
# assert(@@ie.contains_text('Create/Edit Additional Item'),'The Create/Edit Additional Item screen did not appear')
# assert(@@ie.text_field(:id, 'P24_CODE').verify_contains('LOGGER'), 'The additional item code field did not contain value LOGGER')
# assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Data Logger'), 'The description is not logger')
# assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('15'), 'Lead time is not 15')
# assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
# assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
# assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
# startClicker("OK", 1)
# @@ie.button(:id, 'delete').click
#
# #@@ie.wait
# assert_nil(@@ie.contains_text('LOGGER'),'The additional item record with code LOGGER appears on screen')
# end
#
#~ Check that the additional item code cannot be updated
#

View File

@@ -166,33 +166,33 @@ class Test_05_base_screen < Test::Unit::TestCase
end
#
#Check that the base 1765BH2 can be deleted and that the record is no longer displayed in the report
#
def test_05_delete_base
@@ie.link(:text, '1766BH2').click
@@ie.wait
assert(@@ie.contains_text('Create/Edit Base'),'The Create/Edit Base screen did not appear')
assert(@@ie.text_field(:id, 'P51_CODE').verify_contains('1766BH2'), 'The base code field did not contain value 3811H')
assert(@@ie.text_field(:id, 'P51_DESCRIPTION').verify_contains('Base for regulators'), 'The description is not base for meters')
assert(@@ie.text_field(:id, 'P51_DEPTH').verify_contains('3800'), 'Depth is not 3800')
assert(@@ie.text_field(:id, 'P51_DIM_A').verify_contains('3800'), 'DIM A is not 3800')
assert(@@ie.text_field(:id, 'P51_DIM_B').verify_contains('1400'), 'DIM B is not 1400')
assert(@@ie.text_field(:id, 'P51_DIM_C').verify_contains('2400'), 'DIM C is not 2400')
assert(@@ie.text_field(:id, 'P51_DIM_D').verify_contains('3800'), 'DIM D is not 3800')
assert(@@ie.text_field(:id, 'P51_DIM_E').verify_contains('1400'), 'DIM E is not 1400')
assert(@@ie.text_field(:id, 'P51_DIM_F').verify_contains('2400'), 'DIM F is not 2400')
assert(@@ie.text_field(:id, 'P51_DIM_G').verify_contains('3800'), 'DIM G is not 3800')
assert(@@ie.text_field(:id, 'P51_DIM_H').verify_contains('1400'), 'DIM H is not 1400')
assert(@@ie.text_field(:id, 'P51_DIM_I').verify_contains('2400'), 'DIM I is not 2400')
assert(@@ie.select_list(:id, 'P51_DRWG_CODE').selected?('D1'), 'Drawing code is not WI')
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
startClicker("OK", 1)
@@ie.button(:id, 'delete').click
#@@ie.wait
assert_nil(@@ie.contains_text('1765BH2'),'The base code field did contain value 1765BH2')
end
# can't test delete due to javascript popup
# def test_05_delete_base
# @@ie.link(:text, '1766BH2').click
# @@ie.wait
# assert(@@ie.contains_text('Create/Edit Base'),'The Create/Edit Base screen did not appear')
# assert(@@ie.text_field(:id, 'P51_CODE').verify_contains('1766BH2'), 'The base code field did not contain value 3811H')
# assert(@@ie.text_field(:id, 'P51_DESCRIPTION').verify_contains('Base for regulators'), 'The description is not base for meters')
# assert(@@ie.text_field(:id, 'P51_DEPTH').verify_contains('3800'), 'Depth is not 3800')
# assert(@@ie.text_field(:id, 'P51_DIM_A').verify_contains('3800'), 'DIM A is not 3800')
# assert(@@ie.text_field(:id, 'P51_DIM_B').verify_contains('1400'), 'DIM B is not 1400')
# assert(@@ie.text_field(:id, 'P51_DIM_C').verify_contains('2400'), 'DIM C is not 2400')
# assert(@@ie.text_field(:id, 'P51_DIM_D').verify_contains('3800'), 'DIM D is not 3800')
# assert(@@ie.text_field(:id, 'P51_DIM_E').verify_contains('1400'), 'DIM E is not 1400')
# assert(@@ie.text_field(:id, 'P51_DIM_F').verify_contains('2400'), 'DIM F is not 2400')
# assert(@@ie.text_field(:id, 'P51_DIM_G').verify_contains('3800'), 'DIM G is not 3800')
# assert(@@ie.text_field(:id, 'P51_DIM_H').verify_contains('1400'), 'DIM H is not 1400')
# assert(@@ie.text_field(:id, 'P51_DIM_I').verify_contains('2400'), 'DIM I is not 2400')
# assert(@@ie.select_list(:id, 'P51_DRWG_CODE').selected?('D1'), 'Drawing code is not WI')
# assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
# assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
# assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
# startClicker("OK", 1)
# @@ie.button(:id, 'delete').click
#
# #@@ie.wait
# assert_nil(@@ie.contains_text('1765BH2'),'The base code field did contain value 1765BH2')
# end
#
#~ Check that the base code cannot be updated
#

View File

@@ -140,27 +140,27 @@ class Test_03_housings_screen < Test::Unit::TestCase
end
#
#Check that the housing 3811H can be deleted and that the record is no longer displayed in the report
#
def test_05_delete_housing
@@ie.link(:text, '3811H').click
@@ie.wait
assert(@@ie.text_field(:id, 'P55_CODE').verify_contains('3811H'), 'The housing code field did not contain value 3811H')
assert(@@ie.select_list(:id, 'P55_HOTY_CODE').selected?('Walk Thru'), 'The housing type is not Walk Through')
assert(@@ie.text_field(:id, 'P55_DESCRIPTION').verify_contains('Housing for regulators'), 'The description is not housing for meters')
assert(@@ie.text_field(:id, 'P55_DIM_L').verify_contains('3600'), 'DIM L is not 3600')
assert(@@ie.text_field(:id, 'P55_DIM_W').verify_contains('1700'), 'DIM W is not 1700')
assert(@@ie.text_field(:id, 'P55_DIM_H').verify_contains('2200'), 'DIM H is not 2200')
assert(@@ie.text_field(:id, 'P55_WEIGHT').verify_contains('300'), 'Weight is not 300')
assert(@@ie.select_list(:id, 'P55_DRWG_CODE').selected?('WI'), 'Drawing code is not WI')
assert(@@ie.select_list(:id, 'P55_PRTY_ID').selected?('ACTARIS'), 'Manufacturer is not ACTARIS')
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
startClicker("OK", 1)
@@ie.button(:id, 'delete').click
@@ie.wait
assert_nil(@@ie.contains_text('3811H'),'The housing code field did contain value 3811H')
end
# can't delete housing due to javascript popup
# def test_05_delete_housing
# @@ie.link(:text, '3811H').click
# @@ie.wait
# assert(@@ie.text_field(:id, 'P55_CODE').verify_contains('3811H'), 'The housing code field did not contain value 3811H')
# assert(@@ie.select_list(:id, 'P55_HOTY_CODE').selected?('Walk Thru'), 'The housing type is not Walk Through')
# assert(@@ie.text_field(:id, 'P55_DESCRIPTION').verify_contains('Housing for regulators'), 'The description is not housing for meters')
# assert(@@ie.text_field(:id, 'P55_DIM_L').verify_contains('3600'), 'DIM L is not 3600')
# assert(@@ie.text_field(:id, 'P55_DIM_W').verify_contains('1700'), 'DIM W is not 1700')
# assert(@@ie.text_field(:id, 'P55_DIM_H').verify_contains('2200'), 'DIM H is not 2200')
# assert(@@ie.text_field(:id, 'P55_WEIGHT').verify_contains('300'), 'Weight is not 300')
# assert(@@ie.select_list(:id, 'P55_DRWG_CODE').selected?('WI'), 'Drawing code is not WI')
# assert(@@ie.select_list(:id, 'P55_PRTY_ID').selected?('ACTARIS'), 'Manufacturer is not ACTARIS')
# assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
# assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available')
# assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
# startClicker("OK", 1)
# @@ie.button(:id, 'delete').click
# @@ie.wait
# assert_nil(@@ie.contains_text('3811H'),'The housing code field did contain value 3811H')
# end
#
#Check that the housing code cannot be updated
#

View File

@@ -1,13 +1,13 @@
#add the location of this file to Ruby's search path
#so that we can find all our files
File.expand_path(File.dirname(__FILE__)
runfromdir = "C:/build/webmip/tests/"
#requires
require 'watir'
#require our constants
require 'constants'
#require our useful helper methods
require 'default_methods.rb'
require File.dirname(__FILE__)+'default_methods.rb'
#email stuff
require 'net/smtp'
#require the test unit library
@@ -15,15 +15,15 @@ require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'test/unit/testsuite'
#include the integration test cases
require 'login_tests'
require 'enquirytests'
require 'housingtests'
require 'drawingtests'
require 'basestests'
require 'addontests'
require 'exportdatatests'
require 'moduletests'
require 'user_management'
require runfromdir+'login_tests'
require runfromdir+'enquirytests'
require runfromdir+'housingtests'
require runfromdir+'drawingtests'
require runfromdir+'basestests'
require runfromdir+'addontests'
require runfromdir+'exportdatatests'
require runfromdir+'moduletests'
require runfromdir+'user_management'
#includes
include Watir
@@ -88,7 +88,7 @@ passed = tr.start()
if (passed.failure_count() > 0 or passed.error_count() > 0)
#build the email
from_addr = 'jamie.priest@advantica.com'
to_addr = 'priestj@advanticagroup.com'
to_addr = 'priestj@advanticagroup.com mullenmd@advanticagroup.com Kanagasabapathyd@advanticagroup.com'
project = 'webMIP'
errors = sio.string
emailtext = <<END_EMAIL