fixed UI test
This commit is contained in:
parent
c0822cceeb
commit
7ac9f38b84
1 changed files with 20 additions and 2 deletions
|
@ -18,9 +18,27 @@ class ExampleTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_first_page
|
def test_first_page
|
||||||
browser.get "http://portal.znuny.com/"
|
browser.get "http://portal.znuny.com/"
|
||||||
puts browser.current_url
|
|
||||||
assert_equal browser.current_url, "https://portal.znuny.com/#login"
|
assert_equal browser.current_url, "https://portal.znuny.com/#login"
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_login_failed
|
||||||
|
element_username = browser.find_element :name "username"
|
||||||
|
element_username.send_keys = "roy@kaldung.de"
|
||||||
|
element_password = browser.find_element :name "password"
|
||||||
|
element_password.send_keys = "123456"
|
||||||
|
element_form = browser.find_element :id "login"
|
||||||
|
element_form.submit
|
||||||
|
assert_equal browser.current_url, "https://portal.znuny.com/#login"
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_login_passed
|
||||||
|
element_username = browser.find_element :name "username"
|
||||||
|
element_username.send_keys = "roy@kaldung.com"
|
||||||
|
element_password = browser.find_element :name "password"
|
||||||
|
element_password.send_keys = "090504"
|
||||||
|
element_form = browser.find_element :id "login"
|
||||||
|
element_form.submit
|
||||||
|
assert_equal browser.current_url, "https://portal.znuny.com/#ticket_view/my_tickets"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_page_search
|
def test_page_search
|
||||||
|
|
Loading…
Reference in a new issue