Commit a2d71423 authored by Patrick James Ong's avatar Patrick James Ong

Added orders in functional tests

parent 68a6881f
......@@ -57,6 +57,29 @@ class NewVisitorTest(unittest.TestCase):
self.assertIn('', self.browser.find_element_by_ID('new_recipe_name').text)
self.assertIn('', self.browser.find_element_by_ID('new_recipe_quantity').text)
# ORDERS
def test_can_display_orders_list(self):
self.browser.get('http://localhost:8000/orders/list')
self.assertIn('Orders - List', self.browser.title)
ingredients_list = self.browser.find_element_by_ID('orders-list')
self.assertEqual('ul', ingredients_list.tag_name)
def test_can_display_order_detail(self):
self.browser.get('http://localhost:8000/ingredients/detail')
self.assertIn('Ingredients - Detail', self.browser.title)
def test_can_update_order(self):
self.browser.get('http://localhost:8000/ingredients/update')
self.assertIn('Ingredients - Update', self.browser.title)
def test_can_create_new_order(self):
self.browser.get('http://localhost:8000/ingredients/new')
self.assertIn('Ingredients - Create', self.browser.title)
self.assertIn('', self.browser.find_element_by_ID('new_order_name').text)
self.assertIn('', self.browser.find_element_by_ID('new_order_quantity').text)
if __name__ == '__main__':
unittest.main(warnings='ignore')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment