Esempio n. 1
0
def test_create_task():
    tasks = ss("#todo-list>li")
    active = css_class("active")
    completed = css_class("completed")

    visit("http://todomvc.com/examples/troopjs_require/#/")

    for task_text in ["1", "2", "3"]:
        s("#new-todo").set(task_text).press_enter()
    tasks.insist(texts("1", "2", "3")).insist_each(active)
    s("#todo-count").insist(text(3))

    tasks[2].s(".toggle").click()
    tasks.filter(active).insist(texts("1", "2"))
    tasks.filter(active).insist(size(2))
    tasks.filter(completed).insist(texts("3"))

    s("#filters a[href='#/active']").click()
    tasks[:2].insist(texts("1", "2"))
    tasks[2].insist(hidden)
def test_create_task():
    tasks = ss(".todo-list>li")
    active = css_class("active")
    completed = css_class("completed")

    visit("http://todomvc.com/examples/troopjs_require/#/", False)

    for task_text in ["1", "2", "3"]:
        s(".new-todo").set(task_text).press_enter()
    tasks.insist(texts("1", "2", "3")).insist_each(active)
    s(".todo-count").insist(text(3))

    tasks[2].s(".toggle").click()
    tasks.filter(active).insist(texts("1", "2"))
    tasks.filter(active).insist(size(2))
    tasks.filter(completed).insist(texts("3"))

    s(".filters a[href='#/active']").click()
    tasks[:2].insist(texts("1", "2"))
    tasks[2].insist(hidden)
Esempio n. 3
0
def size(size_of_collection):
    return conditions.size(size_of_collection)
Esempio n. 4
0
def test_find_selene_collection_from_hidden_context():
    s("#hidden_button").ss(by.be_following_sibling()).should_have(size(6))