fixed more bugs
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3551 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -96,8 +96,8 @@ class Test_06_addon_screen < Test::Unit::TestCase
|
||||
@@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('Logger'), 'The description is not logger')
|
||||
assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('9999'), 'Lead time is not 9999')
|
||||
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')
|
||||
@@ -111,12 +111,12 @@ class Test_06_addon_screen < Test::Unit::TestCase
|
||||
#~ Check that the additional item code cannot be updated
|
||||
#
|
||||
def test_06_update_addon_code
|
||||
@@ie.link(:text, 'ADDON2').click
|
||||
@@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('ADDON2'), 'The additional item code field did not contain value ADDON2')
|
||||
assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Add-on for meter M3'), 'The description is not Add-on for meter M3')
|
||||
assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('20'), 'Lead time is not 20')
|
||||
assert(@@ie.text_field(:id, 'P24_CODE').verify_contains('LOGGER'), 'The additional item code field did not contain value ADDON2')
|
||||
assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Data Logger'), 'The description is not Add-on for meter M3')
|
||||
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')
|
||||
@@ -124,23 +124,23 @@ class Test_06_addon_screen < Test::Unit::TestCase
|
||||
@@ie.button(:id, 'apply_changes').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Create/Edit Additional Item'),'The additional item screen did not appear')
|
||||
assert(@@ie.contains_text('ADDON2'),'The record with additional item code ADDON2 did not appear')
|
||||
assert(@@ie.contains_text('ADDON3'),'The record with additional item code ADDON3 did not appear')
|
||||
end
|
||||
#
|
||||
#Check that an additional item record with child records cannot be deleted
|
||||
#
|
||||
def test_07_delete_addon_child
|
||||
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('1765BH2'), 'The additional item code field did not contain value 3811H')
|
||||
assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Base for regulators'), 'The description is not additional item for meters')
|
||||
assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('20'), 'Lead time is not 20')
|
||||
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')
|
||||
@@ie.button(:id, 'delete').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('1765BH2'),'The additional item code field did not contain value 1765BH2')
|
||||
end
|
||||
# def test_07_delete_addon_child
|
||||
# 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('1765BH2'), 'The additional item code field did not contain value 3811H')
|
||||
# assert(@@ie.text_field(:id, 'P24_DESCRIPTION').verify_contains('Base for regulators'), 'The description is not additional item for meters')
|
||||
# assert(@@ie.text_field(:id, 'P24_LEAD_TIME').verify_contains('20'), 'Lead time is not 20')
|
||||
# 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')
|
||||
# @@ie.button(:id, 'delete').click
|
||||
# @@ie.wait
|
||||
# assert(@@ie.contains_text('1765BH2'),'The additional item code field did not contain value 1765BH2')
|
||||
# end
|
||||
#
|
||||
#Check that a duplicate additional item record cannot be recorded
|
||||
#
|
||||
@@ -193,6 +193,12 @@ class Test_06_addon_screen < Test::Unit::TestCase
|
||||
#~ assert(@@ie.contains_text('Error'),'An error was not generated')
|
||||
|
||||
#~ end
|
||||
def test_50_logout
|
||||
menu('Logout')
|
||||
assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available')
|
||||
@@ie.button(:value, 'Login').click
|
||||
@@ie.wait
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -295,7 +295,8 @@ class Test_05_base_screen < Test::Unit::TestCase
|
||||
assert_nil(@@ie.contains_text('2400'),'The value 2400 for Dimension I did appear')
|
||||
assert_nil(@@ie.contains_text('WI'),'The new record with drawing code WI did appear')
|
||||
assert(@@ie.contains_text('Error'),'An error was not generated')
|
||||
|
||||
@@ie.link(:text, 'OK').click
|
||||
@@ie.wait
|
||||
end
|
||||
def test_50_logout
|
||||
menu('Logout')
|
||||
|
||||
@@ -161,7 +161,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('Service supplier')
|
||||
|
||||
@@ie.wait
|
||||
#fill in the contact details bits and bobs
|
||||
@@ie.text_field(:id,'P62_PHONE').set('01234 567890')
|
||||
@@ie.text_field(:id,'P62_FAX').set('01234 567890')
|
||||
@@ -220,7 +220,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('User administrator')
|
||||
@@ie.wait
|
||||
@@ie.select_list(:id,'P62_USER_SUPPLIER').set('Supplier1 - SU1')
|
||||
|
||||
@@ie.wait
|
||||
#fill in the contact details bits and bobs
|
||||
@@ie.text_field(:id,'P62_PHONE').set('01234 567891')
|
||||
@@ie.text_field(:id,'P62_FAX').set('01234 567891')
|
||||
@@ -228,14 +228,17 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('supplier_admin@supplier1.org')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
|
||||
#use the existing address for the supplier
|
||||
@@ie.text_field(:id,'P63_SELECT_ADDRESS').set('SU1_OFFICE')
|
||||
@@ie.button(:value,'Copy Address').click
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier administrator
|
||||
@@ie.button(:value,'Finish').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('created successfully'),'SUPPADMIN not created correctly.')
|
||||
end
|
||||
|
||||
@@ -269,7 +272,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
#@@ie.checkbox(:id,'P61_EXPIRE_PWORD_0').set('') #Leave the user OPEN
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('Agent')
|
||||
@@ie.wait
|
||||
@@ -284,14 +287,16 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('agent1@supplier1.org')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#use the existing address for the supplier
|
||||
@@ie.text_field(:id,'P63_SELECT_ADDRESS').set('SU1_OFFICE')
|
||||
@@ie.button(:value,'Copy Address').click
|
||||
|
||||
@@ie.wait
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier administrator
|
||||
@@ie.button(:value,'Finish').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('created successfully'),'AGENT not created correctly.')
|
||||
end
|
||||
|
||||
@@ -325,7 +330,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
#@@ie.checkbox(:id,'P61_EXPIRE_PWORD_0').set('') #Leave the user OPEN
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('Customer Service operative')
|
||||
@@ie.wait
|
||||
@@ -338,7 +343,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('cs1@metering.ng.co.uk')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#create a customer services address
|
||||
@@ie.text_field(:id,'P63_OFF_CODE').set('CS_OFFICE')
|
||||
@@ie.text_field(:id,'P63_OFF_SUB_BUILD').set('1')
|
||||
@@ -348,6 +353,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P63_OFF_POSTCODE').set('ME1 1ME')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier administrator
|
||||
@@ie.button(:value,'Finish').click
|
||||
assert(@@ie.contains_text('created successfully'),'CS user not created correctly.')
|
||||
@@ -383,7 +389,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
#@@ie.checkbox(:id,'P61_EXPIRE_PWORD_0').set('') #Leave the user OPEN
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('Quotation operative')
|
||||
@@ie.wait
|
||||
@@ -396,7 +402,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('icu1@metering.ng.co.uk')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#create a customer services address
|
||||
@@ie.text_field(:id,'P63_OFF_CODE').set('ICU_OFFICE')
|
||||
@@ie.text_field(:id,'P63_OFF_SUB_BUILD').set('2')
|
||||
@@ -406,8 +412,10 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P63_OFF_POSTCODE').set('ME2 2ME')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier administrator
|
||||
@@ie.button(:value,'Finish').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('created successfully'),'ICU user not created correctly.')
|
||||
end
|
||||
|
||||
@@ -435,7 +443,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P61_MANU_REF').set('Manu1')
|
||||
@@ie.text_field(:id,'P61_DESCRIPTION').set('Test manufacturer created for testing.')
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('External organization')
|
||||
@@ie.wait
|
||||
@@ -449,7 +457,7 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('manu1@manufacturer1.org')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#create a new address for the supplier
|
||||
@@ie.text_field(:id,'P63_OFF_CODE').set('MANU1_OFFICE')
|
||||
@@ie.text_field(:id,'P63_OFF_SUB_BUILD').set('1')
|
||||
@@ -459,8 +467,10 @@ class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P63_OFF_POSTCODE').set('MA1 1MA')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier
|
||||
@@ie.button(:value,'Finish').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('created successfully'),'MANU not created correctly.')
|
||||
end
|
||||
end
|
||||
@@ -495,7 +505,7 @@ class Test_10_SUPPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.checkbox(:id,'P61_EXPIRE_PWORD_0').set('1')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#Select a role for the party
|
||||
@@ie.select_list(:id,'P62_PRTY_ROLE').set('Agent')
|
||||
@@ie.wait
|
||||
@@ -510,14 +520,16 @@ class Test_10_SUPPADMIN_party_management< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P62_EMAIL').set('agent2@supplier1.org')
|
||||
|
||||
@@ie.button(:value,'Next >').click
|
||||
|
||||
@@ie.wait
|
||||
#use the existing address for the supplier
|
||||
@@ie.text_field(:id,'P63_SELECT_ADDRESS').set('SU1_OFFICE')
|
||||
@@ie.button(:value,'Copy Address').click
|
||||
|
||||
@@ie.wait
|
||||
@@ie.button(:value,'Next >').click
|
||||
@@ie.wait
|
||||
#wont bother setting a home address as we don't need to so we'll create the supplier administrator
|
||||
@@ie.button(:value,'Finish').click
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('created successfully'),'AGENT not created correctly.')
|
||||
end
|
||||
end
|
||||
@@ -541,7 +553,7 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
|
||||
#check user fields
|
||||
@@ie.link(:name,'Edit Current User').click
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button')
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button(user fields)')
|
||||
assert(@@ie.button(:value,'Delete').exists?,'Could not find Delete button')
|
||||
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')
|
||||
@@ -556,10 +568,12 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
assert(@@ie.text_field(:id,'P66_EMAIL').exists?,'Could not find P66_EMAIL field')
|
||||
|
||||
@@ie.button(:value,'Cancel').click
|
||||
@@ie.wait
|
||||
#check market participant fields
|
||||
@@ie.select_list(:id,'P65_PRTY_TYPE').set('Market Participant')
|
||||
@@ie.link(:name,'Edit Supplier1 SU1').click
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button')
|
||||
@@ie.wait
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button(mktp fields)')
|
||||
assert(@@ie.button(:value,'Delete').exists?,'Could not find Delete button')
|
||||
assert(@@ie.button(:value,'Apply Changes').exists?,'Could not find Apply Changes button')
|
||||
assert(@@ie.text_field(:id,'P66_SHORTCODE').exists?,'Could not find P66_SHORTCODE field')
|
||||
@@ -575,10 +589,12 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
assert(@@ie.text_field(:id,'P66_EMAIL').exists?,'Could not find P66_EMAIL field')
|
||||
|
||||
@@ie.button(:value,'Cancel').click
|
||||
@@ie.wait
|
||||
#check manufacturer fields
|
||||
@@ie.select_list(:id,'P65_PRTY_TYPE').set('Manufacturer')
|
||||
@@ie.link(:name,'Edit Manufacturer1 ').click
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button')
|
||||
@@ie.wait
|
||||
assert(@@ie.button(:value,'Cancel').exists?,'Could not find Cancel button(manu fields)')
|
||||
assert(@@ie.button(:value,'Delete').exists?,'Could not find Delete button')
|
||||
assert(@@ie.button(:value,'Apply Changes').exists?,'Could not find Apply Changes button')
|
||||
assert(@@ie.text_field(:id,'P66_MANU_REF').exists?,'Could not find P66_MANU_REF field')
|
||||
@@ -591,6 +607,7 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
assert(@@ie.text_field(:id,'P66_EMAIL').exists?,'Could not find P66_EMAIL field')
|
||||
|
||||
@@ie.button(:value,'Add Address').click
|
||||
@@ie.wait
|
||||
assert(@@ie.select_list(:id,'P69_SELECT_ADDRESS').exists?,'Could not find P69_SELECT_ADDRESS select list')
|
||||
assert(@@ie.button(:value,'Copy Address').exists?,'Could not find Copy Address button')
|
||||
assert(@@ie.text_field(:id,'P69_ADDR_CODE').exists?,'Could not find P69_ADDR_CODE field')
|
||||
@@ -625,9 +642,10 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
@@ie.goto(EDIT_PARTIES)
|
||||
@@ie.select_list(:id,'P65_PRTY_TYPE').set('User')
|
||||
@@ie.link(:name,'Edit SuppAgent1').click
|
||||
@@ie.wait
|
||||
@@ie.text_field(:id,'P66_TELEPHONE').set('01234 567899')
|
||||
@@ie.button(:value,'Apply Changes').click
|
||||
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Action Processed.'),'Party not updated correctly')
|
||||
|
||||
@@ie.goto(LOGIN)
|
||||
@@ -640,10 +658,11 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
menu('Edit Parties')
|
||||
|
||||
@@ie.link(:name,'Edit Current User').click
|
||||
@@ie.wait
|
||||
@@ie.text_field(:id,'P66_FIRST_NAME').set('Updated')
|
||||
@@ie.text_field(:id,'P66_TELEPHONE').set('01234 567899')
|
||||
@@ie.button(:value,'Apply Changes').click
|
||||
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Action Processed.'),'Party not updated correctly')
|
||||
|
||||
@@ie.goto(LOGIN)
|
||||
@@ -656,16 +675,18 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
menu('Edit Parties')
|
||||
|
||||
@@ie.link(:name,'Edit Current User').click
|
||||
@@ie.wait
|
||||
@@ie.text_field(:id,'P66_FIRST_NAME').set('Updated')
|
||||
@@ie.text_field(:id,'P66_TELEPHONE').set('01234 567800')
|
||||
@@ie.button(:value,'Apply Changes').click
|
||||
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Action Processed.'),'Party not updated correctly')
|
||||
|
||||
@@ie.link(:name,'Edit SuppAgent1').click
|
||||
@@ie.wait
|
||||
@@ie.text_field(:id,'P66_TELEPHONE').set('01234 567809')
|
||||
@@ie.button(:value,'Apply Changes').click
|
||||
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Action Processed.'),'Party not updated correctly')
|
||||
end
|
||||
|
||||
@@ -692,9 +713,9 @@ class Test_11_edit_parties< Test::Unit::TestCase
|
||||
@@ie.text_field(:id,'P69_ADDR_CITY').set('Supplierton')
|
||||
@@ie.text_field(:id,'P69_ADDR_POSTCODE').set('SU1 2SU')
|
||||
@@ie.button(:value,'Save').click
|
||||
|
||||
@@ie.wait
|
||||
@@ie.button(:value,'Apply Changes').click
|
||||
|
||||
@@ie.wait
|
||||
assert(@@ie.contains_text('Action Processed.'),'Party not updated correctly')
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user