MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / test_todomvc

Method test_todomvc

examples/test_todomvc.py:17–38  ·  view source on GitHub ↗
(self, framework)

Source from the content-addressed store, hash-verified

15
16 @parameterized.expand([["jquery"], ["react"], ["vue"]])
17 def test_todomvc(self, framework):
18 self.goto("https://todomvc.com/")
19 self.clear_local_storage()
20 self.click('a[href*="examples/%s/dist"]' % framework)
21 self.assert_element("section.todoapp")
22 self.assert_text("todos", "header h1")
23 self.wait_for_ready_state_complete()
24 title = self.get_title()
25 self.assert_in(framework, title.lower())
26 new_todo_input = "input.new-todo"
27 todo_count_span = "span.todo-count"
28 self.wait_for_ready_state_complete()
29 self.type(new_todo_input, "Learn Python\n")
30 self.type(new_todo_input, "Learn JavaScript\n")
31 self.type(new_todo_input, "Learn SeleniumBase\n")
32 self.assert_text("3 items left", todo_count_span)
33 self.check_if_unchecked("ul.todo-list li input")
34 self.check_if_unchecked("ul.todo-list li:nth-of-type(2) input")
35 self.check_if_unchecked("ul.todo-list li:nth-of-type(3) input")
36 self.assert_text("0 items left", todo_count_span)
37 self.click("button.clear-completed")
38 self.assert_element_not_visible(todo_count_span)

Callers

nothing calls this directly

Calls 11

clear_local_storageMethod · 0.80
gotoMethod · 0.45
clickMethod · 0.45
assert_elementMethod · 0.45
assert_textMethod · 0.45
get_titleMethod · 0.45
assert_inMethod · 0.45
typeMethod · 0.45
check_if_uncheckedMethod · 0.45

Tested by

no test coverage detected