Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thegoodplace
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Santino Campos
thegoodplace
Commits
60fd89c2
Commit
60fd89c2
authored
Mar 17, 2020
by
Santino Campos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix functional test by making browser check the url for each view in the project
parent
d9c5b563
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
functional_test.py
functional_test.py
+12
-0
No files found.
functional_test.py
View file @
60fd89c2
...
...
@@ -15,52 +15,64 @@ class NewOrderToCheckTest(unittest.TestCase):
#Thibault first enters a new order into the website
#He goes to the order creation form of the website
#Test content of orders_create_form
self
.
browser
.
get
(
'http://localhost:8000/orders/create'
)
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
#Test content of orders_list
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of orders_detail
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of orders_update_form
self
.
browser
.
get
(
'http://localhost:8000/orders/update'
)
self
.
assertIn
(
'<h1> Orders - Update </h1>'
,
self
.
browser
.
page_source
)
#Thibault then enters the new recipe into the website
#He goes to the recipe creation form of the website
#Test content of recipes_create_form
self
.
browser
.
get
(
'http://localhost:8000/recipes/create'
)
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
#Test content of recipes_list
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of recipes_detail
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of recipes_update_form
self
.
browser
.
get
(
'http://localhost:8000/recipes/update'
)
self
.
assertIn
(
'<h1> Recipes - Update </h1>'
,
self
.
browser
.
page_source
)
#Thibault then enters the new ingredient into the website database
#He goes to the ingredient creation form of the website
#Test content of ingedients_create_form
self
.
browser
.
get
(
'http://localhost:8000/ingredients/create'
)
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
#Test content of ingredients_list
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of ingredients_detail
self
.
browser
.
get
(
'http://localhost:8000/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
#Test content of ingredients_update_form
self
.
browser
.
get
(
'http://localhost:8000/ingredients/update'
)
self
.
assertIn
(
'<h1> Ingredients - Update </h1>'
,
self
.
browser
.
page_source
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment