|
|
|
@@ -7,9 +7,11 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
#all the columns required for the report appears with the button to create a new drawings record
|
|
|
|
#all the columns required for the report appears with the button to create a new drawings record
|
|
|
|
#
|
|
|
|
#
|
|
|
|
def test_01_drawing_screen_appears
|
|
|
|
def test_01_drawing_screen_appears
|
|
|
|
@@ie.goto(DRAWING)
|
|
|
|
@@ie.goto(LOGIN)
|
|
|
|
#we'll need to login
|
|
|
|
#now we'll need to login
|
|
|
|
login(DK, DK_PWD)
|
|
|
|
login(DEFAULT, DEFAULT_PWD)
|
|
|
|
|
|
|
|
menu('Administration')
|
|
|
|
|
|
|
|
menu('Drawings')
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Code'),'The drawing code column did not appear')
|
|
|
|
assert(@@ie.contains_text('Code'),'The drawing code column did not appear')
|
|
|
|
assert(@@ie.contains_text('Description'),'The drawing description column did not appear')
|
|
|
|
assert(@@ie.contains_text('Description'),'The drawing description column did not appear')
|
|
|
|
@@ -24,8 +26,8 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@@ -34,8 +36,8 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
#Check that the new drawing record appears in the report
|
|
|
|
#Check that the new drawing record appears in the report
|
|
|
|
#
|
|
|
|
#
|
|
|
|
def test_03_create_drawing
|
|
|
|
def test_03_create_drawing
|
|
|
|
@@ie.text_field(:id, 'P13_CODE').set("D1")
|
|
|
|
@@ie.text_field(:id, 'P53_CODE').set("D1")
|
|
|
|
@@ie.text_field(:id, 'P13_DESCRIPTION').set("Drawing for housing")
|
|
|
|
@@ie.text_field(:id, 'P53_DESCRIPTION').set("Drawing for housing")
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
@@ -44,16 +46,16 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
@@ie.text_field(:id, 'P13_CODE').set("D2")
|
|
|
|
@@ie.text_field(:id, 'P53_CODE').set("D2")
|
|
|
|
@@ie.text_field(:id, 'P13_DESCRIPTION').set("Drawing for module")
|
|
|
|
@@ie.text_field(:id, 'P53_DESCRIPTION').set("Drawing for module")
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('D2'),'The new record with drawing code D1 did not appear')
|
|
|
|
assert(@@ie.contains_text('D2'),'The new record with drawing code D2 did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawing for module'),'The description for D2, Drawing for module did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawing for module'),'The description for D2, Drawing for module did not appear')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
#
|
|
|
|
#
|
|
|
|
@@ -62,12 +64,29 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
#
|
|
|
|
#
|
|
|
|
def test_04_update_drawing
|
|
|
|
def test_04_update_drawing
|
|
|
|
@@ie.link(:text, 'D1').click
|
|
|
|
@@ie.link(:text, 'D1').click
|
|
|
|
assert(@@ie.text_field(:id, 'P13_CODE').verify_contains('D1'),'The drawing code field did not contain value D1')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_CODE').verify_contains('D1'),'The drawing code field did not contain value D1')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_DESCRIPTION').verify_contains('Drawing for housing'),'The drawing description field did not contain value Drawing for housing')
|
|
|
|
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, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
assert(@@ie.button(:id, 'delete').exists?,'The delete 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')
|
|
|
|
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
|
|
|
|
@@ie.text_field(:id, 'P13_DESCRIPTION').set('Drawing for base')
|
|
|
|
assert(@@ie.button(:id, 'upload').exists?,'The file upload/replace button was not available')
|
|
|
|
|
|
|
|
@@ie.button(:id, 'upload').click
|
|
|
|
|
|
|
|
@@ie.wait
|
|
|
|
|
|
|
|
assert(@@ie.contains_text('Upload File'),'The file upload screen did not appear')
|
|
|
|
|
|
|
|
assert(@@ie.button(:id, 'P41_FILE_UPLOAD').exists?,'The file upload field was not available')
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#Upload a file to the drawing and check that we get a success message
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
filetoupload = 'c:\ruby\LICENSE.txt'
|
|
|
|
|
|
|
|
@@ie.text_field(:id, 'P41_FILE_UPLOAD').set(filetoupload)
|
|
|
|
|
|
|
|
@@ie.button(:id, 'upload').click
|
|
|
|
|
|
|
|
@@ie.wait
|
|
|
|
|
|
|
|
assert(@@ie.button(:id, 'upload').exists?,'The file upload/replace button was not available')
|
|
|
|
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
|
|
|
|
assert(@@ie.contains_text('D1'),'The record with drawing code D1 did not appear')
|
|
|
|
|
|
|
|
assert(@@ie.contains_text('Drawing uploaded'),'The success message Drawing uploaded did not appear')
|
|
|
|
|
|
|
|
#set description and save
|
|
|
|
|
|
|
|
@@ie.text_field(:id, 'P53_DESCRIPTION').set('Drawing for base')
|
|
|
|
@@ie.button(:id, 'apply_changes').click
|
|
|
|
@@ie.button(:id, 'apply_changes').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
@@ -79,8 +98,8 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
#
|
|
|
|
#
|
|
|
|
def test_05_delete_drawing
|
|
|
|
def test_05_delete_drawing
|
|
|
|
@@ie.link(:text, 'D2').click
|
|
|
|
@@ie.link(:text, 'D2').click
|
|
|
|
assert(@@ie.text_field(:id, 'P13_CODE').verify_contains('D2'),'The drawing code is not D2')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_CODE').verify_contains('D2'),'The drawing code is not D2')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_DESCRIPTION').verify_contains('Drawing for module'),'The description is not drawing for module')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_DESCRIPTION').verify_contains('Drawing for module'),'The description is not drawing for module')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
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, 'delete').exists?,'The delete button was not available')
|
|
|
|
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
|
|
|
|
assert(@@ie.button(:id, 'apply_changes').exists?,'The Apply Changes button was not available')
|
|
|
|
@@ -125,12 +144,12 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.contains_text('Create/Edit Drawings'),'The create/edit drawing screen did not appear')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_CODE').exists?,'The drawings code field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P13_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.text_field(:id, 'P53_DESCRIPTION').exists?,'The drawings description field is not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'create').exists?,'The create button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
assert(@@ie.button(:id, 'cancel').exists?,'The cancel button was not available')
|
|
|
|
@@ie.text_field(:id, 'P13_CODE').set("D1")
|
|
|
|
@@ie.text_field(:id, 'P53_CODE').set("D1")
|
|
|
|
@@ie.text_field(:id, 'P13_DESCRIPTION').set("HOUSING")
|
|
|
|
@@ie.text_field(:id, 'P53_DESCRIPTION').set("HOUSING")
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.button(:id, 'create').click
|
|
|
|
@@ie.wait
|
|
|
|
@@ie.wait
|
|
|
|
assert_nil(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
assert_nil(@@ie.contains_text('Drawings'),'The drawing screen did not appear')
|
|
|
|
@@ -140,11 +159,3 @@ class Test_02_drawings_screen < Test::Unit::TestCase
|
|
|
|
end
|
|
|
|
end
|
|
|
|
#
|
|
|
|
#
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|