Exemple #1
0
def test_home_loads():
    browser.open('/')
    page = Page()
    assert 'Cockerel' in page.title

    assert page.offers_signup_link
    assert page.offers_login_link
Exemple #2
0
def test_login():
    browser.open('/')
    page = Page()
    assert page.offers_login_link
    page.click_login_link()
    page = Login()
    assert page.offers_login_form
    login = page.login_form
    login.fill(dict(username='******', password='******'))
    page.click_submit()
    assert not page.offers_login_form
Exemple #3
0
def test_signup():

    browser.open('/')
    page = Page()
    assert page.offers_signup_link
    page.click_signup_link()

    page = Signup()
    assert page.offers_signup_form
    foo = page.signup_form
    foo.fill(dict(username='******', password='******'))
    foo.submit()
    assert not page.offers_signup_link