bootstrap libraries added via cdn js & css script & link tags; some bootstrap styling added to base.html & list.html; unit tests updated to accomodate html parsing in assertContains() library fns (but n.b., not all unit tests have been updated to accomodate bootstrap attrs, so some still fail); all FTs currently passing from last commit
This commit is contained in:
@@ -9,7 +9,11 @@ class HomePageTest(TestCase):
|
||||
def test_renders_input_form(self):
|
||||
response = self.client.get('/')
|
||||
self.assertContains(response, '<form method="POST" action="/apps/dashboard/newlist">')
|
||||
self.assertContains(response, '<input name="item_text"')
|
||||
self.assertContains(
|
||||
response,
|
||||
'<input name="item_text" id="id-new-item" placeholder="Enter a to-do item" />',
|
||||
html=True,
|
||||
)
|
||||
|
||||
class ListAndItemModelsTest(TestCase):
|
||||
def test_saving_and_retrieving_items(self):
|
||||
@@ -52,7 +56,11 @@ class DashViewTest(TestCase):
|
||||
response,
|
||||
f'<form method="POST" action="/apps/dashboard/{mylist.id}/add-item">',
|
||||
)
|
||||
self.assertContains(response, '<input name="item_text"')
|
||||
self.assertContains(
|
||||
response,
|
||||
'<input name="item_text" id="id-new-item" placeholder="Enter a to-do item" />',
|
||||
html=True,
|
||||
)
|
||||
|
||||
def test_displays_only_items_for_that_list(self):
|
||||
# Given/Arrange
|
||||
|
||||
Reference in New Issue
Block a user