Пример #1
0
def test_cancel_editing():
    todomvc.given_opened_with('a', 'b', 'c')

    todomvc.cancel_editing('b', 'to be canceled')

    todomvc.should_have('a', 'b', 'c')
    todomvc.should_have_items_left(3)
Пример #2
0
def test_edit_by_focus_change():
    todomvc.given_opened_with('a', 'b', 'c')

    todomvc.edit_by_focus_change('b', 'b edited')

    todomvc.should_have('a', 'b edited', 'c')
    todomvc.should_have_items_left(3)
Пример #3
0
def test_delete():
    todomvc.given_opened_with('a', 'b', 'c')

    todomvc.delete('b')

    todomvc.should_have('a', 'c')
    todomvc.should_have_items_left(2)
Пример #4
0
def test_complete_all():
    todomvc.given_opened_with('a', 'b', 'c')

    todomvc.toggle_all()

    todomvc.should_have_active()
    todomvc.should_have_completed('a', 'b', 'c')
    todomvc.should_have_items_left(0)
Пример #5
0
def test_clear_completed():
    todomvc.given_opened_with('a', 'b', 'c', 'd')
    todomvc.toggle('b')
    todomvc.toggle('d')

    todomvc.clear_completed()

    todomvc.should_have('a', 'c')
    todomvc.should_have_items_left(2)
def test_basic_app_functionality():
    todomvc.given_opened_with()

    todomvc.create('a', 'b', 'c')
    todomvc.should_have('a', 'b', 'c')

    todomvc.edit('b', 'b edited')

    todomvc.toggle('b edited')
    todomvc.clear_completed()
    todomvc.should_have('a', 'c')

    todomvc.cancel_editing('c', 'to be canceled')

    todomvc.delete('c')
    todomvc.should_have('a')
Пример #7
0
def test_delete_last_todo():
    todomvc.given_opened_with('a')

    todomvc.delete('a')

    todomvc.should_be_empty()