@@ -645,33 +645,32 @@ Ran 17 tests in 0.126s
645
645
OK
646
646
----
647
647
648
- And the functional tests too:
648
+ And the functional tests too, where we can see three errors :
649
649
650
- [subs="specialcharacters,macros"]
651
650
----
652
- $ pass:quotes[*python src/manage.py test functional_tests*]
651
+ ERROR: test_layout_and_styling ( functional_tests.test_layout_and_styling.LayoutAndStylingTest.test_layout_and_styling)
653
652
[...]
654
- File "...goat-book/src/functional_tests/test_layout_and_styling.py", line 27,
655
- in test_layout_and_styling
656
- inputbox = self.get_item_input_box()
657
- ^^^^^^^^^^^^^^^^^^^^^^^^^
658
- File "...goat-book/src/functional_tests/base.py", line 45, in
659
- get_item_input_box
660
- return self.browser.find_element(By.ID, "id_text")
661
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
653
+ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate
654
+ element: [id="id_text"];
655
+ [...]
656
+ ERROR: test_can_start_a_todo_list (functional_tests.test_simple_list_creation.NewVisitorTest.test_can_start_a_todo_list)
662
657
[...]
663
658
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate
664
- element: [id="id_text"]; [...]
665
-
659
+ element: [id="id_text"];
666
660
[...]
667
- FAILED (errors=3)
668
661
----
669
662
670
- Not quite! Let's look at where this is happening--if
671
- you check the line number from one of the failures,
672
- you'll see that each time after we've submitted a first item,
673
- the input box has disappeared from the lists page.
663
+ and
664
+
665
+ ----
666
+ ERROR: test_cannot_add_empty_list_items (functional_tests.test_list_item_validation.ItemValidationTest.test_cannot_add_empty_list_items)
667
+ [...]
668
+ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate
669
+ element: .invalid-feedback;
670
+ [...]
671
+ ----
674
672
673
+ Let's start with the latter.
675
674
Checking _views.py_ and the `new_list` view we can see
676
675
it's because if we detect a validation error,
677
676
we're not actually passing the form to the _home.html_ template:
0 commit comments