From d23d91c0d92e8944b0dee3ce434574431ac40090 Mon Sep 17 00:00:00 2001 From: PriestJ Date: Thu, 6 Mar 2008 15:50:41 +0000 Subject: [PATCH] added tests for the new meter selection functionality/fields on the enquiry form as part of #335 git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3871 248e525c-4dfb-0310-94bc-949c084e9493 --- tests/default_methods.rb | 3 ++ tests/enquirytests.rb | 92 +++++++++++++++++++++++++++++++--------- 2 files changed, 75 insertions(+), 20 deletions(-) diff --git a/tests/default_methods.rb b/tests/default_methods.rb index 5660195..da31900 100644 --- a/tests/default_methods.rb +++ b/tests/default_methods.rb @@ -39,6 +39,9 @@ def login(p_username, p_password) # # Enter logon details # + if @@ie.radio( :id,'P101_TC_ACCEPTED').exists? then + @@ie.radio( :id,'P101_TC_ACCEPTED_0').set #'I accept the Terms and Conditions of using this site' + end @@ie.text_field( :id, 'P101_USERNAME' ).set( p_username ) @@ie.text_field( :id, 'P101_PASSWORD' ).set( p_password ) # diff --git a/tests/enquirytests.rb b/tests/enquirytests.rb index 6d12e9d..29ce059 100644 --- a/tests/enquirytests.rb +++ b/tests/enquirytests.rb @@ -24,7 +24,7 @@ class Test_02_enquiry < Test::Unit::TestCase def test_01_enquiry_screen_appears @@ie.goto(ENQUIRY) login(DEFAULT, DEFAULT_PWD) - assert(@@ie.contains_text('Enquiry'),'The data export screen did not appear') + assert(@@ie.contains_text('Enquiry'),'The enquiry screen did not appear') #check the regions appear assert(@@ie.contains_text('Site Detail'),'Site Detail region not found') assert(@@ie.contains_text('Site Address'),'The Site Address region not found') @@ -87,7 +87,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METY_CODE').exists?,'Could not find P32_METY_CODE select list') assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -206,7 +207,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Found P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Found P32_EXISTING_METER_SERIAL_NO field') - assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Found P32_EXISTING_METER_MODEL field') + assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Found P32_EXISTING_METER_MODEL field') + assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Found P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Found P32_EXISTING_LOGGER select list') @@ -245,7 +247,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Found P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Found P32_EXISTING_METER_SERIAL_NO field') - assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Found P32_EXISTING_METER_MODEL field') + assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Found P32_EXISTING_METER_MODEL field') + assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Found P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Found P32_EXISTING_LOGGER select list') @@ -280,7 +283,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert_equal(false,@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Found P32_EXISTING_LOGGER select list') @@ -315,7 +319,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -350,7 +355,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -385,7 +391,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -420,7 +427,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -455,7 +463,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -490,7 +499,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -525,7 +535,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -560,7 +571,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -595,7 +607,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert_equal(false,@@ie.select_list(:id,'P32_EXISTING_SVCP_CODE').exists?,'Found P32_EXISTING_SVCP_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -678,7 +691,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METY_CODE').exists?,'Could not find P32_METY_CODE select list') assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') assert(@@ie.text_field(:id,'P32_EXISTING_METER_SERIAL_NO').exists?,'Could not find P32_EXISTING_METER_SERIAL_NO field') - assert(@@ie.text_field(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') assert(@@ie.select_list(:id,'P32_MARKET_SECTOR_CODE').exists?,'Could not find P32_MARKET_SECTOR_CODE select list') assert(@@ie.text_field(:id,'P32_OTHER_INFORMATION').exists?,'Could not find P32_OTHER_INFORMATION field') assert(@@ie.text_field(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') @@ -932,7 +946,7 @@ class Test_02_enquiry < Test::Unit::TestCase end def test_26_upload_manual_quote - menu('Logout') + menu('Logout') assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available') @@ie.button(:value, 'Login').click @@ie.wait @@ -1073,12 +1087,50 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.contains_text('Manual Quote'),'Manual Quote Region not found '+geterrormess(@@ie)) assert(@@ie.link(:text,'View PDF').exists?,'Could not find link to manual quote file '+geterrormess(@@ie)) end -#Check asterisk on correct fields -#Amend an existing enquiry -#Is dash doing this?Copy an existing enquiry to a new enquiry #Tripartite agreement(need to get data) #Test Manual quote, request for quote and upload file buttons - + def test_27_check_the_meter_model_selection + fulllisofmetertypes=["-Please select a value-", + "Coriolis", + "Diaphragm", + "OTHER Meter Type", + "Orifice","Rotary", + "Turbine", + "Ultrasonic flow"] + menu('Logout') + assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available') + @@ie.button(:value, 'Login').click + @@ie.wait + login(MIPADMIN, MIPADMIN_PWD) + menu('Enquiries') + menu('Create Enquiry') + assert(@@ie.contains_text('Enquiry'),'The Enquiry screen did not appear '+geterrormess(@@ie)) + #Set the enquiry to an exchange job as this requires the user to select a meter to remove + @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[5] + @@ie.wait + #check the fields we want to test have remained on the page + assert(@@ie.select_list(:id,'P32_EXISTING_MESC_CODE').exists?,'Could not find P32_EXISTING_MESC_CODE select list') + assert(@@ie.select_list(:id,'P32_EXISTING_METY_CODE').exists?,'Could not find P32_EXISTING_METY_CODE select list') + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').exists?,'Could not find P32_EXISTING_PRTY_ID field') + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').exists?,'Could not find P32_EXISTING_METER_MODEL field') + #set the meter size to U16, this should force the meter type to default to diaphragm + @@ie.select_list(:id,'P32_EXISTING_MESC_CODE').set 'U16' + @@ie.wait + assert_equal(["-Please select a value-","Diaphragm"],@@ie.select_list(:id,'P32_EXISTING_METY_CODE').getAllContents,'List of options for P32_EXISTING_METY_CODE did not match what was expected') + #check that if we select OTHER and -Please select a value- all the meter types are available + @@ie.select_list(:id,'P32_EXISTING_MESC_CODE').set '-Please select a value-' + @@ie.wait + assert_equal(fulllisofmetertypes,@@ie.select_list(:id,'P32_EXISTING_METY_CODE').getAllContents,'List of options for P32_EXISTING_METY_CODE did not match what was expected') + @@ie.select_list(:id,'P32_EXISTING_MESC_CODE').set 'OTHER' + @@ie.wait + assert_equal(fulllisofmetertypes,@@ie.select_list(:id,'P32_EXISTING_METY_CODE').getAllContents,'List of options for P32_EXISTING_METY_CODE did not match what was expected') + #check that the list of meters is more than 2 items long if the meter type is diaphragm + #we would always expect to have at least one manufacturer for diaphragms + @@ie.select_list(:id,'P32_EXISTING_METY_CODE').set "Diaphragm" + assert(@@ie.select_list(:id,'P32_EXISTING_METER_MODEL').getAllContents.length > 2,"Did not find any diaphragm meter models") + assert(@@ie.select_list(:id,'P32_EXISTING_PRTY_ID').getAllContents.length > 2,"Did not find any diaphragm meter manufacturers") + + end def test_50_logout menu('Logout') assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available '+geterrormess(@@ie))