Пример #1
0
def test_complete_all():
    todomvc.visit()
    todomvc.add('a', 'b', 'c')

    todomvc.toggle_all()

    todomvc.should_have_active()
    todomvc.should_have_completed('a', 'b', 'c')
    todomvc.should_have_items_left(0)
Пример #2
0
def test_complete_all_with_few_competed():
    todomvc.visit()
    todomvc.add('a', 'b', 'c', 'e')
    todomvc.toggle('b', 'e')

    todomvc.toggle_all()

    todomvc.should_have_completed('a', 'b', 'c', 'e')
    todomvc.should_have_active()
    todomvc.should_have_items_left(0)
    todomvc.should_have_clear_completed_visible()
Пример #3
0
def test_activate_all():
    todomvc.visit()
    todomvc.add('a', 'b', 'c')
    todomvc.toggle_all()

    todomvc.toggle_all()

    todomvc.should_have_active('a', 'b', 'c')
    todomvc.should_have_completed()
    todomvc.should_have_items_left(3)
    todomvc.should_have_clear_completed_hidden()
Пример #4
0
def test_activate():
    todomvc.visit()
    todomvc.add('a', 'b', 'c', 'd', 'e')
    todomvc.toggle('a', 'c', 'e')

    todomvc.toggle('a', 'c', 'e')

    todomvc.should_have_active('a', 'b', 'c', 'd', 'e')
    todomvc.should_have_completed_count(0)
    todomvc.should_have_completed()
    todomvc.should_have_items_left(5)
    todomvc.should_have_clear_completed_hidden()