コード例 #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_create_many():
    todomvc.open()

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

    todomvc.should_have('a', 'b', 'c')
    todomvc.should_have_items_left(3)
コード例 #4
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)
コード例 #5
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)
コード例 #6
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)
コード例 #7
0
def test_create_first_todo():
    todomvc.open()

    todomvc.should_be_empty()

    todomvc.create('a')

    todomvc.should_have('a')
    todomvc.should_have_items_left(1)