Commit 73290f66 authored by cianlaguesma's avatar cianlaguesma

added titles for html files and fixed FT

parent 7ff5bebb
......@@ -4,7 +4,7 @@
<h1 id="header_home">The Good Place Froyo Shop</h1>
</head>
<body>
<ul>
<ul id="main_list">
<li><a href="http://localhost:8000/ingredients/create_form" id="ingredients_create_form">Create form for Ingredients</a></li>
<li><a href="http://localhost:8000/ingredients/update_form" id="ingredients_update_form">Update form for Ingredients</a></li>
<li><a href="http://localhost:8000/ingredients/list" id="ingredients_list">See List for all Ingredients</a></li>
......
<html>
<head>
<title>Ingredients - Create Form</title>
<h1 id="ingredients_create_form_header">Ingredients - Create Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
......
<html>
<head>
<title>Ingredients - Detail</title>
<h1 id="ingredients_detail_header">Ingredients - Detail</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
......
<html>
<head>
<title>Ingredients - List</title>
<h1 id="ingredients_list_header">Ingredients - List</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
......
<html>
<head>
<title>Ingredients - Update Form</title>
<h1 id="ingredients_update_form_header">Ingredients - Update Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
......
<html>
<head>
<title>Orders - Create Form</title>
<h1 id="orders_create_form_header">Orders - Create Form</h1>
</head>
<body><a href="http://localhost:8000/index" id="home">Return to Home Page</a></body>
......
<html>
<head>
<title>Orders - Detail</title>
<h1 id="orders_detail_header">Orders - Detail</h1>
</head>
......
<html>
<head>
<title>Orders - List</title>
<h1 id="orders_list_header">Orders - List</h1>
</head>
......
<html>
<head>
<title>Orders - Update Form</title>
<h1 id="orders_update_form_header">Orders - Update Form</h1>
</head>
......
<html>
<head>
<title>Recipes - Create Form</title>
<h1 id="recipes_create_form_header">Recipes - Create Form</h1>
</head>
......
<html>
<head>
<title>Recipes - Detail</title>
<h1 id="recipes_detail_header">Recipes - Detail</h1>
</head>
......
<html>
<head>
<title>Recipes - List</title>
<h1 id="recipes_list_header">Recipes - List</h1>
</head>
......
<html>
<head>
<title>Recipes - Update Form</title>
<h1 id="recipes_update_form_header">Recipes - Update Form</h1>
</head>
......
......@@ -16,15 +16,19 @@ class NewVisitorTest(unittest.TestCase):
# The Good Place Froyo Shopz
self.assertIn('The Good Place FroYo Shop', self.browser.title)
self.assertTrue(self.browser.find_element_by_id("header_home"))
#He notices a list
main_list = self.browser.find_element_by_id('main_list')
self.assertEqual('ul',main_list.tag_name)
def test_froyo_create_form_ingredients(self):
# He noticed that he can create a form for the ingredients so he went there and he noticed the header Ingredients - Create Form so he clicked it
# He noticed that he can create a form for the ingredients so he went there and he noticed the header and title Ingredients - Create Form so he clicked it
self.browser.get('http://localhost:8000/index')
create_ingredient = self.browser.find_element_by_id('ingredients_create_form')
create_ingredient.click()
time.sleep(1)
self.assertEqual('http://localhost:8000/ingredients/create_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("ingredients_create_form_header"))
self.assertIn('Ingredients - Create Form', self.browser.title)
# After creating the ingredient, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -35,13 +39,14 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_update_form_ingredients(self):
# He noticed that he can also update the forms so he went there and he noticed the header Ingredients - Update Form so he clicked it and updated his form
# He noticed that he can also update the forms so he went there and he noticed the header and title Ingredients - Update Form so he clicked it and updated his form
self.browser.get('http://localhost:8000/index')
update_ingredient = self.browser.find_element_by_id('ingredients_update_form')
update_ingredient.click()
time.sleep(1)
self.assertEqual('http://localhost:8000/ingredients/update_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("ingredients_update_form_header"))
self.assertIn('Ingredients - Update Form', self.browser.title)
# After Updating the ingredient, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -53,7 +58,7 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_display_detail_ingredients(self):
# He noticed that there are details for the ingredients so he went there and he noticed the header Ingredients - Detail
# He noticed that there are details for the ingredients so he went there and he noticed the header and title Ingredients - Detail
self.browser.get('http://localhost:8000/index')
detail_ingredient = self.browser.find_element_by_id('ingredients_detail')
......@@ -61,6 +66,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/ingredients/detail',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("ingredients_detail_header"))
self.assertIn('Ingredients - Detail', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -71,7 +77,7 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_display_list_ingredients(self):
# He noticed that there are also lists for the ingredients so he went there and he noticed the header Ingredients - List
# He noticed that there are also lists for the ingredients so he went there and he noticed the header and title Ingredients - List
self.browser.get('http://localhost:8000/index')
list_ingredient = self.browser.find_element_by_id('ingredients_list')
......@@ -79,6 +85,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/ingredients/list',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("ingredients_list_header"))
self.assertIn('Ingredients - List', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -88,7 +95,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertTrue(self.browser.find_element_by_id("header_home"))
def test_froyo_create_form_orders(self):
#He noticed that he can create a form to create an order so he went there and he noticed the header Orders - Create Form
#He noticed that he can create a form to create an order so he went there and he noticed the header and title Orders - Create Form
self.browser.get('http://localhost:8000/index')
create_order = self.browser.find_element_by_id('orders_create_form')
......@@ -96,6 +103,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/orders/create_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("orders_create_form_header"))
self.assertIn('Orders - Create Form', self.browser.title)
# After creating the form, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -107,7 +115,7 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_update_form_orders(self):
#He noticed that he can update a form to update an order so he went there and he noticed the header Orders - Update Form
#He noticed that he can update a form to update an order so he went there and he noticed the header and title Orders - Update Form
self.browser.get('http://localhost:8000/index')
update_order = self.browser.find_element_by_id('orders_update_form')
......@@ -115,6 +123,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/orders/update_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("orders_update_form_header"))
self.assertIn('Orders - Update Form', self.browser.title)
# After Updating the order, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -126,7 +135,7 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_display_detail_orders(self):
#He also wanted to look at the detail of a record for an order so he went and looked at one and he noticed the header Orders - Detail
#He also wanted to look at the detail of a record for an order so he went and looked at one and he noticed the header and title Orders - Detail
self.browser.get('http://localhost:8000/index')
......@@ -135,6 +144,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/orders/detail',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("orders_detail_header"))
self.assertIn('Orders - Detail', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -145,7 +155,7 @@ class NewVisitorTest(unittest.TestCase):
def test_froyo_display_list_orders(self):
#He also wanted to look at the list records for orders so he went and he noticed the header Orders - List
#He also wanted to look at the list records for orders so he went and he noticed the header and title Orders - List
self.browser.get('http://localhost:8000/index')
list_order = self.browser.find_element_by_id('orders_list')
......@@ -154,6 +164,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertEqual('http://localhost:8000/orders/list',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("orders_list_header"))
# After this, he went back home
self.assertIn('Orders - List', self.browser.title)
home = self.browser.find_element_by_id('home')
home.click()
time.sleep(1)
......@@ -162,7 +173,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertTrue(self.browser.find_element_by_id("header_home"))
def test_froyo_create_form_recipes(self):
#He noticed that he can create a form for a recipe so he went there and he noticed the header Recipes - Create Form
#He noticed that he can create a form for a recipe so he went there and he noticed the header and title Recipes - Create Form
self.browser.get('http://localhost:8000/index')
create_recipe = self.browser.find_element_by_id('recipe_create_form')
......@@ -170,6 +181,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/recipes/create_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("recipes_create_form_header"))
self.assertIn('Recipes - Create Form', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -179,7 +191,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertTrue(self.browser.find_element_by_id("header_home"))
def test_froyo_update_form_recipes(self):
#He noticed that he can update a form for a recipe so he went there and he noticed the header Recipes - Update Form
#He noticed that he can update a form for a recipe so he went there and he noticed the header and title Recipes - Update Form
self.browser.get('http://localhost:8000/index')
update_recipe = self.browser.find_element_by_id('recipe_update_form')
......@@ -187,6 +199,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/recipes/update_form',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("recipes_update_form_header"))
self.assertIn('Recipes - Update Form', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -196,7 +209,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertTrue(self.browser.find_element_by_id("header_home"))
def test_froyo_display_detail_recipes(self):
#He also wanted to look at the detail of a record for a recipe so he went and looked at one and he noticed the header Recipes - Detail
#He also wanted to look at the detail of a record for a recipe so he went and looked at one and he noticed the header and title Recipes - Detail
self.browser.get('http://localhost:8000/index')
detail_recipe = self.browser.find_element_by_id('recipe_detail')
......@@ -204,6 +217,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1)
self.assertEqual('http://localhost:8000/recipes/detail',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("recipes_detail_header"))
self.assertIn('Recipes - Detail', self.browser.title)
# After this, he went back home
home = self.browser.find_element_by_id('home')
home.click()
......@@ -213,7 +227,7 @@ class NewVisitorTest(unittest.TestCase):
self.assertTrue(self.browser.find_element_by_id("header_home"))
def test_froyo_display_list_recipes(self):
#He also wanted to look at the list records for recipes so he went and he noticed the header Recipes - List
#He also wanted to look at the list records for recipes so he went and he noticed the header and title Recipes - List
self.browser.get('http://localhost:8000/index')
list_recipe = self.browser.find_element_by_id('recipe_list')
......@@ -222,15 +236,13 @@ class NewVisitorTest(unittest.TestCase):
self.assertEqual('http://localhost:8000/recipes/list',self.browser.current_url)
self.assertTrue(self.browser.find_element_by_id("recipes_list_header"))
# After this, he went back home
self.assertIn('Recipes - List', self.browser.title)
home = self.browser.find_element_by_id('home')
home.click()
time.sleep(1)
self.assertEqual('http://localhost:8000/index',self.browser.current_url)
self.assertIn('The Good Place FroYo Shop', self.browser.title)
self.assertTrue(self.browser.find_element_by_id("header_home"))
self.fail('Finish the test!')
if __name__ == '__main__':
unittest.main(warnings='ignore')
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