(self, framework)
| 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) |
nothing calls this directly
no test coverage detected