Exemplo n.º 1
0
def then_i_see_the_post_in_the_editing_form(step):
    title = css("#id_title").get_attribute("value").strip()
    assert title == "My Title Draft", "wrong title: '%s'" % title
    body = css("#id_body").text.strip()
    assert body == "This is the body of my Draft post", "wrong body: '%s'" % body
Exemplo n.º 2
0
def then_the_post_appears_on_my_blog(step):
    world.browser.get(django_url("/blogs/"))
    csss("a.read-more")[0].click()
    assert css("h2").text.strip() == "My Title Publish"
Exemplo n.º 3
0
def given_i_click_on_the_first_one(step):
    css("a.edit-post").click()
Exemplo n.º 4
0
def and_i_visit_the_post_editor(step):
    world.browser.get(django_url("/posts/edit"))
    css(".edit-post")
Exemplo n.º 5
0
def given_i_create_a_post_with_status(step, status):
    css("#id_title").send_keys("My Title %s" % status)
    css("#id_body").send_keys("This is the body of my %s post" % status)
    css(".tagit-input").send_keys("tag1, tag2, tag3")
    css("#id_status").send_keys(status)
    css("input[type=submit]").click()
Exemplo n.º 6
0
def then_i_see_the_post_in_the_editing_form(step):
    title = css("#id_title").get_attribute("value").strip()
    assert title == "My Title Draft", "wrong title: '%s'" % title
    body = css("#id_body").text.strip()
    assert body == "This is the body of my Draft post", "wrong body: '%s'" % body
Exemplo n.º 7
0
def given_i_click_on_the_first_one(step):
    css("a.edit-post").click()
Exemplo n.º 8
0
def then_the_post_appears_on_my_blog(step):
    world.browser.get(django_url("/blogs/"))
    csss("a.read-more")[0].click()
    assert css("h2").text.strip() == "My Title Publish"
Exemplo n.º 9
0
def given_i_create_a_post_with_status(step, status):
    css("#id_title").send_keys("My Title %s" % status)
    css("#id_body").send_keys("This is the body of my %s post" % status)
    css(".tagit-input").send_keys("tag1, tag2, tag3")
    css("#id_status").send_keys(status)
    css("input[type=submit]").click()
Exemplo n.º 10
0
def and_i_visit_the_post_editor(step):
    world.browser.get(django_url("/posts/edit"))
    css(".edit-post")