Commit 2f161a2b authored by Santino Campos's avatar Santino Campos

Write functional test for website

parent abc9c7b9
...@@ -15,45 +15,54 @@ class NewOrderToCheckTest(unittest.TestCase): ...@@ -15,45 +15,54 @@ class NewOrderToCheckTest(unittest.TestCase):
#Thibault first enters a new order into the website #Thibault first enters a new order into the website
#He goes to the order creation form of the website #He goes to the order creation form of the website
#Test content of orders_create_form #Test content of orders_create_form
self.assertIn('<h1> Orders - Create </h1>', self.browser.page_source)
#He then goes to the list of all orders in the website to check if his inputted order is still there #He then goes to the list of all orders in the website to check if his inputted order is still there
#Test content of orders_list #Test content of orders_list
self.assertIn('<h1> Orders - List </h1>', self.browser.page_source)
#He then go to the page of the specific order he just inputted #He then go to the page of the specific order he just inputted
#Test content of orders_detail #Test content of orders_detail
self.assertIn('<h1> Orders - Detail </h1>', self.browser.page_source)
#He then notices that the order is lacking a specific customisation, so he updates the order information #He then notices that the order is lacking a specific customisation, so he updates the order information
#Test content of orders_update_form #Test content of orders_update_form
self.assertIn('<h1> Orders - Update </h1>', self.browser.page_source)
#Thibault then enters the new recipe into the website #Thibault then enters the new recipe into the website
#He goes to the recipe creation form of the website #He goes to the recipe creation form of the website
#Test content of recipes_create_form #Test content of recipes_create_form
self.assertIn('<h1> Recipes - Create </h1>', self.browser.page_source)
#He then goes to the list of all recipes in the website to check if his inputted recipe is still there #He then goes to the list of all recipes in the website to check if his inputted recipe is still there
#Test content of recipes_list #Test content of recipes_list
self.assertIn('<h1> Recipes - List </h1>', self.browser.page_source)
#He then go to the page of the specific recipe he just inputted #He then go to the page of the specific recipe he just inputted
#Test content of recipes_detail #Test content of recipes_detail
self.assertIn('<h1> Recipes - Detail </h1>', self.browser.page_source)
#He then notices that the recipe is lacking an ingredient in its information, so he updates the recipe information #He then notices that the recipe is lacking an ingredient in its information, so he updates the recipe information
#Test content of recipes_update_form #Test content of recipes_update_form
self.assertIn('<h1> Recipes - Update </h1>', self.browser.page_source)
#Thibault then enters the new ingredient into the website database #Thibault then enters the new ingredient into the website database
#He goes to the ingredient creation form of the website #He goes to the ingredient creation form of the website
#Test content of ingedients_create_form #Test content of ingedients_create_form
self.assertIn('<h1> Ingredients - Create </h1>', self.browser.page_source)
#He then goes to the list of all ingredientss in the website to check if his inputted ingredient is still there #He then goes to the list of all ingredientss in the website to check if his inputted ingredient is still there
#Test content of ingredients_list #Test content of ingredients_list
self.assertIn('<h1> Ingredients - List </h1>', self.browser.page_source)
#He then go to the page of the specific ingredient he just inputted #He then go to the page of the specific ingredient he just inputted
#Test content of ingredients_detail #Test content of ingredients_detail
self.assertIn('<h1> Ingredients - Detail </h1>', self.browser.page_source)
#He then notices that the ingredien is labelled as having 5 units on hand, whereas the establishement never ordered this recipe before, he then updates its on-hand count to zero #He then notices that the ingredien is labelled as having 5 units on hand, whereas the establishement never ordered this recipe before, he then updates its on-hand count to zero
#Test content of ingredients_update_form #Test content of ingredients_update_form
self.assertIn('<h1> Ingredients - Update </h1>', self.browser.page_source)
#He then closes the website
self.fail('Finish the test!')
if __name__ == '__main__': if __name__ == '__main__':
......
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