def test_cancel_edit_by_esc(): todomvc.open_at_all().add('a', 'b', 'c') todomvc.cancel_edit('b', 'b edited') todomvc.should_have_list('a', 'b', 'c') todomvc.should_have_items_left(3)
def test_delete_by_edit_to_blank(): todomvc.open_at_all().add('a', 'b', 'c') todomvc.edit_by_enter('b', '') todomvc.should_have_list('a', 'c') todomvc.should_have_items_left(2)
def test_edit_by_tab(): todomvc.open_at_all().add('a', 'b', 'c') todomvc.edit_by_tab('b', 'b edited') todomvc.should_have_list('a', 'b edited', 'c') todomvc.should_have_items_left(3)
def test_add_many(): todomvc.open_at_all() todomvc.add('a', 'b', 'c') todomvc.should_have_list('a', 'b', 'c') todomvc.should_have_items_left(3)
def test_complete(): todomvc.open_at_all().add('a', 'b', 'c') todomvc.toggle('b') todomvc.should_have_items_left(2) todomvc.should_have_active('a', 'c') todomvc.should_have_completed('b')
def test_clear_completed(): todomvc.open_at_all().add('a', 'b', 'c', 'd')\ .toggle('b')\ .toggle('c') todomvc.clear_completed() todomvc.should_have_list('a', 'd') todomvc.should_have_items_left(2)
def test_add_first(): todomvc.open_at_all() # WHEN nothing todomvc.add() todomvc.should_have_empty_list() todomvc.should_have_hidden_footer() # WHEN one todomvc.add('a') todomvc.should_have_list('a') todomvc.should_have_items_left(1)
def test_delete(): todomvc.open_at_all() # delete one todomvc.add('a')\ .delete('a') todomvc.should_have_hidden_footer() todomvc.should_have_empty_list() # delete many todomvc.add('a', 'b', 'c', 'd')\ .delete('b')\ .delete('c') todomvc.should_have_items_left(2) todomvc.should_have_list('a', 'd')