Commit 862659c0 authored by Lance Michael O. Co's avatar Lance Michael O. Co 😢

refactored html files, urls.py, and functional test

parent 60547524
<html>
<title>Home</title>
<head>
<title>
The Good Place FroYo Shop
</title>
</head>
<h1>
The Good Place FroYo Shop
</h1>
<ul>
<li>
<a href="http://localhost:8000/orders" id="orders">Orders</a>
</li>
<li>
<a href="http://localhost:8000/recipes" id="recipes">Recipes</a>
</li>
<li>
<a href="http://localhost:8000/ingredients" id="ingredients">Ingredients</a>
</li>
</ul>
</html>
\ No newline at end of file
<html>
<head>
<title>
Ingredients
</title>
</head>
<body>
<h1>
Ingredients
</h1>
<ul>
<li>
<a href="http://localhost:8000/ingredients/create" id="ingredients-create-form">Create an Ingredient</a>
</li>
<li>
<a href="http://localhost:8000/ingredients/detail" id="ingredients-detail">Check the Details of an Ingredient</a>
</li>
<li>
<a href="http://localhost:8000/ingredients/list" id="ingredients-list">List the Ingredients</a>
</li>
<li>
<a href="http://localhost:8000/ingredients/update" id="ingredients-update-form">Update the Ingredients</a>
</li>
</ul>
<a href="http://localhost:8000/" id="back_to_home_page">Return to Home Page</a>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>
Orders
</title>
</head>
<body>
<h1>
Orders
</h1>
<ul>
<li>
<a href="http://localhost:8000/orders/create" id="orders-create-form">Create an Order</a>
</li>
<li>
<a href="http://localhost:8000/orders/detail" id="orders-detail">Check the Details of an Order</a>
</li>
<li>
<a href="http://localhost:8000/orders/list" id="orders-list">List the Orders</a>
</li>
<li>
<a href="http://localhost:8000/orders/update" id="orders-update-form">Update the Orders</a>
</li>
</ul>
<a href="http://localhost:8000/" id="back_to_home_page">Return to Home Page</a>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>
Recipes
</title>
</head>
<body>
<h1>
Recipes
</h1>
<ul>
<li>
<a href="http://localhost:8000/recipes/create" id="recipes-create-form">Create an Recipe</a>
</li>
<li>
<a href="http://localhost:8000/recipes/detail" id="recipes-detail">Check the Details of an Recipe</a>
</li>
<li>
<a href="http://localhost:8000/recipes/list" id="recipes-list">List the Recipes</a>
</li>
<li>
<a href="http://localhost:8000/recipes/update" id="recipes-update-form">Update the Recipes</a>
</li>
</ul>
<a href="http://localhost:8000/" id="back_to_home_page">Return to Home Page</a>
</body>
</html>
\ No newline at end of file
......@@ -17,18 +17,18 @@ urlpatterns = [
#ingredients urls
url(r'^ingredients/list$', IngredientsList.as_view(), name='ingredients-list'),
url(r'^ingredients/detail$', IngredientsDetail.as_view(), name='ingredients-detail'),
url(r'^ingredients/update$', IngredientsUpdate.as_view(), name='ingredients-update'),
url(r'^ingredients/create$', IngredientsCreate.as_view(), name='ingredients-create'),
url(r'^ingredients/update$', IngredientsUpdate.as_view(), name='ingredients-update-form'),
url(r'^ingredients/create$', IngredientsCreate.as_view(), name='ingredients-create-form'),
#recipes urls
url(r'^recipes/list$', RecipesList.as_view(), name='recipes-list'),
url(r'^recipes/detail$', RecipesDetail.as_view(), name='recipes-detail'),
url(r'^recipes/update$', RecipesUpdate.as_view(), name='recipes-update'),
url(r'^recipes/create$', RecipesCreate.as_view(), name='recipes-create'),
url(r'^recipes/update$', RecipesUpdate.as_view(), name='recipes-update-form'),
url(r'^recipes/create$', RecipesCreate.as_view(), name='recipes-create-form'),
#orders urls
url(r'^orders/list$', OrdersList.as_view(), name='orders-list'),
url(r'^orders/detail$', OrdersDetail.as_view(), name='orders-detail'),
url(r'^orders/update$', OrdersUpdate.as_view(), name='orders-update'),
url(r'^orders/create$', OrdersCreate.as_view(), name='orders-create'),
url(r'^orders/update$', OrdersUpdate.as_view(), name='orders-update-form'),
url(r'^orders/create$', OrdersCreate.as_view(), name='orders-create-form'),
]
\ No newline at end of file
......@@ -19,10 +19,11 @@ class NewVisitorTest(unittest.TestCase):
#user checks page title to ensure he's at the right page
self.assertIn('The Good Place FroYo Shop', self.browser.title)
#user sees 3 links (orders, ingredients, recipes)
orders = self.browser.find_element_by_id('orders')
#user sees 3 links (ingredients, recipes, orders)
ingredients = self.browser.find_element_by_id('ingredients')
recipes = self.browser.find_element_by_id('recipes')
orders = self.browser.find_element_by_id('orders')
def test_can_see_and_use_ingredients_page(self):
#user clicks on ingredients page
......
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