Patch for Watir test from Bret Pettichord
This commit is contained in:
parent
cd1d5135a0
commit
64dae975ae
|
@ -19,8 +19,9 @@ class E2EInstikiTest < Test::Unit::TestCase
|
||||||
def startup
|
def startup
|
||||||
@@instiki = InstikiController.start
|
@@instiki = InstikiController.start
|
||||||
|
|
||||||
sleep 5
|
sleep 8
|
||||||
@@ie = Watir::IE.start(HOME)
|
@@ie = Watir::IE.start(HOME)
|
||||||
|
@@ie.set_fast_speed unless ARGV.includes? '-demo'
|
||||||
|
|
||||||
setup_web
|
setup_web
|
||||||
setup_home_page
|
setup_home_page
|
||||||
|
@ -268,19 +269,19 @@ class E2EInstikiTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_web
|
def setup_web
|
||||||
assert_equal 'Wiki', ie.textField(:name, 'web_name').value
|
assert_equal 'Wiki', ie.text_field(:name, 'web_name').value
|
||||||
assert_equal 'wiki', ie.textField(:name, 'web_address').value
|
assert_equal 'wiki', ie.text_field(:name, 'web_address').value
|
||||||
assert_equal '', ie.textField(:name, 'password').value
|
assert_equal '', ie.text_field(:name, 'password').value
|
||||||
assert_equal '', ie.textField(:name, 'password_check').value
|
assert_equal '', ie.text_field(:name, 'password_check').value
|
||||||
|
|
||||||
ie.textField(:name, 'password').set('123')
|
ie.text_field(:name, 'password').set('123')
|
||||||
ie.textField(:name, 'password_check').set('123')
|
ie.text_field(:name, 'password_check').set('123')
|
||||||
ie.button(:value, 'Setup').click
|
ie.button(:value, 'Setup').click
|
||||||
assert_equal url(:new, 'HomePage'), ie.url
|
assert_equal url(:new, 'HomePage'), ie.url
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_home_page
|
def setup_home_page
|
||||||
ie.textField(:name, 'content').set('Homepage of a test wiki')
|
ie.text_field(:name, 'content').set('Homepage of a test wiki')
|
||||||
ie.button(:value, 'Submit').click
|
ie.button(:value, 'Submit').click
|
||||||
assert_equal url(:show, 'HomePage'), ie.url
|
assert_equal url(:show, 'HomePage'), ie.url
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue