diff --git a/tests/basestests.rb b/tests/basestests.rb index 0f2dd36..a38bf64 100644 --- a/tests/basestests.rb +++ b/tests/basestests.rb @@ -3,7 +3,7 @@ #--- class Test_05_base_screen < Test::Unit::TestCase # - #Test we can logon to the system using the webmip administrator user’s login credentials and check that + #Test we can logon to the system using the webmip administrator user�s login credentials and check that #all the columns required for the report appears with the button to create a new base record # def test_01_bases_screen_appears @@ -131,7 +131,7 @@ class Test_05_base_screen < Test::Unit::TestCase @@ie.link(:text, '1766BH1').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('1766BH1'), 'The base code field did not contain value 1766BH1') + assert(@@ie.contains_text('1766BH1'), 'The base code field did not contain value 1766BH1') assert(@@ie.text_field(:id, 'P51_DESCRIPTION').verify_contains('Base for meters'), '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') diff --git a/tests/drawingtests.rb b/tests/drawingtests.rb index 10c8c6f..c964ebb 100644 --- a/tests/drawingtests.rb +++ b/tests/drawingtests.rb @@ -3,7 +3,7 @@ #--- class Test_04_drawings_screen < Test::Unit::TestCase # - #Test we can logon to the system using the webmip administrator user’s login credentials and check that + #Test we can logon to the system using the webmip administrator user�s login credentials and check that #all the columns required for the report appears with the button to create a new drawings record # def test_01_drawing_screen_appears @@ -65,7 +65,7 @@ class Test_04_drawings_screen < Test::Unit::TestCase # def test_04_update_drawing @@ie.link(:text, 'D1').click - assert(@@ie.text_field(:id, 'P53_CODE').verify_contains('D1'),'The drawing code field did not contain value D1') + assert(@@ie.contains_text('D1'),'The drawing code field did not contain value D1') assert(@@ie.text_field(:id, 'P53_DESCRIPTION').verify_contains('Drawing for housing'),'The drawing description field did not contain value Drawing for housing') assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available') assert(@@ie.button(:id, 'delete').exists?,'The delete button was not available') diff --git a/tests/enquirytests.rb b/tests/enquirytests.rb index 57f9377..43372ae 100644 --- a/tests/enquirytests.rb +++ b/tests/enquirytests.rb @@ -35,7 +35,7 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.contains_text('Exclusion saved.'),'Exclusion saved message not found') end # - #Test we can logon to the system using the webmip administrator user�s login credentials + #Test we can logon to the system using the webmip administrator user's login credentials #and create a new enquiry screen # def test_02_enquiry_screen_appears @@ -92,7 +92,7 @@ class Test_02_enquiry < Test::Unit::TestCase assert_equal(false,@@ie.select_list(:id,'P32_HOUSING_REQUIRED').exists?,'Found P32_HOUSING_REQUIRED select list') assert_equal(false,@@ie.select_list(:id,'P32_BASE_REQUIRED').exists?,'Found P32_BASE_REQUIRED select list') assert_equal(false,@@ie.select_list(:id,'P32_CONVERTOR_REQUIRED').exists?,'Found P32_CONVERTOR_REQUIRED select list') - assert(@@ie.select_list(:id,'P32_AMR_REQUIRED').exists?,'Could not find P32_AMR_REQUIRED select list') + assert_equal(false,@@ie.select_list(:id,'P32_AMR_REQUIRED').exists?,'found P32_AMR_REQUIRED select list') assert_equal(false,@@ie.select_list(:id,'P32_EMS_REQUIRED').exists?,'Found P32_EMS_REQUIRED select list') assert_equal(false,@@ie.select_list(:id,'P32_BYPASS_REQUIRED').exists?,'Found P32_BYPASS_REQUIRED select list') assert_equal(false,@@ie.select_list(:id,'P32_LOAD_CONTROL_TYPE').exists?,'Found P32_LOAD_CONTROL_TYPE select list') @@ -149,7 +149,7 @@ class Test_02_enquiry < Test::Unit::TestCase @@ie.select_list(:id,'P32_ASSET_LOCATION_NOTES').set "Upload" @@ie.wait assert_equal(listofcontactmech,@@ie.select_list(:id, 'P32_ASSET_LOCATION_NOTES').getAllContents ,'The expected list of asset location delivery mechanisms was not found') - assert(@@ie.text_field(:id,'P32_UPLOAD_ASSET_LOCATION_NOTES').exists?,'Could not find P32_UPLOAD_ASSET_LOCATION_NOTES field') + assert(@@ie.file_field(:id,'P32_UPLOAD_ASSET_LOCATION_NOTES').exists?,'Could not find P32_UPLOAD_ASSET_LOCATION_NOTES file_field') end # #Check that the contacts address appears if you select no (the contact @@ -311,7 +311,7 @@ class Test_02_enquiry < Test::Unit::TestCase 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not Find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not Find P32_EXISTING_CONVERTOR select list') end def test_12_exchange_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[5] @@ -346,8 +346,8 @@ class Test_02_enquiry < Test::Unit::TestCase 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_13_std_exchange_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[4] @@ -382,8 +382,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_14_remove_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[11] @@ -418,8 +418,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_15_std_remove_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[10] @@ -454,8 +454,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_16_adversarial_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[1] @@ -490,8 +490,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_17_alteration_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[2] @@ -526,8 +526,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_18_capacity_change_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[3] @@ -562,8 +562,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_19_addon_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[9] @@ -598,8 +598,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_20_other_selected_check_fields_appear_available @@ie.select_list(:id,'P32_ENTY_CODE').set @@enquirytypes[8] @@ -634,8 +634,8 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_EXISTING_METR_CODE').exists?,'Could not find P32_EXISTING_METR_CODE 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') - assert(@@ie.text_field(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') + assert(@@ie.select_list(:id,'P32_EXISTING_LOGGER').exists?,'Could not find P32_EXISTING_LOGGER select list') + assert(@@ie.select_list(:id,'P32_EXISTING_CONVERTOR').exists?,'Could not find P32_EXISTING_CONVERTOR select list') end def test_21_logout_and_then_in_as_agent_check_enquiry_displays_correctly menu('Logout') @@ -692,7 +692,7 @@ class Test_02_enquiry < Test::Unit::TestCase assert(@@ie.select_list(:id,'P32_INDICATIVE_TIME').exists?,'Could not find P32_INDICATIVE_TIME select list') assert(@@ie.text_field(:id,'P32_INDICATIVE_DATE').exists?,'Could not find P32_INDICATIVE_DATE field') assert(@@ie.text_field(:id,'P32_OTHER_PROJECT_REFERENCE').exists?,'Could not find P32_OTHER_PROJECT_REFERENCE field') - assert(@@ie.select_list(:id,'P32_AMR_REQUIRED').exists?,'Could not find P32_AMR_REQUIRED select list') + assert_equal(false,@@ie.select_list(:id,'P32_AMR_REQUIRED').exists?,'Found P32_AMR_REQUIRED select list') assert(@@ie.text_field(:id,'P32_JOB_DESCRIPTION').exists?,'Could not find P32_JOB_DESCRIPTION field') assert(@@ie.text_field(:id,'P32_QMAX').exists?,'Could not find P32_QMAX field') assert(@@ie.text_field(:id,'P32_QMIN').exists?,'Could not find P32_QMIN field') diff --git a/tests/housingtests.rb b/tests/housingtests.rb index db6f14b..fec7046 100644 --- a/tests/housingtests.rb +++ b/tests/housingtests.rb @@ -111,7 +111,7 @@ class Test_03_housings_screen < Test::Unit::TestCase @@ie.link(:text, '1766H').click @@ie.wait assert(@@ie.contains_text('Create/Edit Housings'),'The Create/Edit Housings screen did not appear') - assert(@@ie.text_field(:id, 'P55_CODE').verify_contains('1766H'), 'The housing code field did not contain value 1765H') + assert(@@ie.contains_text('1766H'), 'The housing code field did not contain value 1765H') #assert_equal(@@ie.select_list(:id, 'P55_HOTY_CODE').getAllContents, ['Lift Off', 'Unknown Housing Type - inserted for bulk load', 'Walk In', 'Walk Through'], 'Not all values found in Housing type Select list') assert(@@ie.select_list(:id, 'P55_HOTY_CODE').selected?('Lift Off'), 'The housing type is not LIFT OFF') assert(@@ie.text_field(:id, 'P55_DESCRIPTION').verify_contains('Housing for meters'), 'The description is not housing for meters') diff --git a/tests/user_management.rb b/tests/user_management.rb index 8430b16..164a9a1 100644 --- a/tests/user_management.rb +++ b/tests/user_management.rb @@ -76,7 +76,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase assert(@@ie.text_field(:id,'P61_COMMENTS').exists?,'Could not find P61_COMMENTS field') assert(@@ie.text_field(:id,'P61_PASSWORD').exists?,'Could not find P61_PASSWORD file upload field') assert(@@ie.text_field(:id,'P61_REPEAT_PASSWORD').exists?,'Could not find P61_REPEAT_PASSWORD file upload field') - assert(@@ie.checkbox(:id,'P61_EXPIRE_PWORD').exists?,'Could not find P61_EXPIRE_PWORD checkbox') + assert(@@ie.radio(:id,'P61_EXPIRE_PWORD').exists?,'Could not find P61_EXPIRE_PWORD radio buttons') #Test the objects on P62 @@ie.goto(ASSIGN_PARTY_ROLE) @@ -556,7 +556,8 @@ class Test_11_edit_parties< Test::Unit::TestCase @@ie.link(:name,'Edit Current User').click assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button(user fields)') assert(@@ie.button(:value,'Apply Changes').exists?,'Could not find Apply Changes button') - assert(@@ie.select_list(:id,'P66_STATUS').exists?,'Could not find P66_STATUS select list') + #Status is a display only field + #assert(@@ie.select_list(:id,'P66_STATUS').exists?,'Could not find P66_STATUS select list') assert(@@ie.text_field(:id,'P66_FIRST_NAME').exists?,'Could not find P66_FIRST_NAME field') assert(@@ie.text_field(:id,'P66_LAST_NAME').exists?,'Could not find P66_LAST_NAME field') assert(@@ie.text_field(:id,'P66_PERSONAL_TITLE').exists?,'Could not find P66_PERSONAL_TITLE field')