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
Patrick James Ong
thegoodplace
Commits
68a6881f
Commit
68a6881f
authored
Mar 17, 2020
by
Patrick James Ong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added recipes in functional tests
parent
3fe16ba8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
functional_tests.py
thegoodplace/functional_tests.py
+23
-0
No files found.
thegoodplace/functional_tests.py
View file @
68a6881f
...
@@ -34,6 +34,29 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -34,6 +34,29 @@ class NewVisitorTest(unittest.TestCase):
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_ingredient_name'
)
.
text
)
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_ingredient_name'
)
.
text
)
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_ingredient_quantity'
)
.
text
)
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_ingredient_quantity'
)
.
text
)
# RECIPES
def
test_can_display_recipes_list
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes/list'
)
self
.
assertIn
(
'Recipes - List'
,
self
.
browser
.
title
)
recipes_list
=
self
.
browser
.
find_element_by_ID
(
'recipes-list'
)
self
.
assertEqual
(
'ul'
,
recipes_list
.
tag_name
)
def
test_can_display_recipes_detail
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes/detail'
)
self
.
assertIn
(
'Recipes - Detail'
,
self
.
browser
.
title
)
def
test_can_update_recipe
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes/update'
)
self
.
assertIn
(
'Recipes - Update'
,
self
.
browser
.
title
)
def
test_can_create_new_recipe
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes/new'
)
self
.
assertIn
(
'Recipes - Create'
,
self
.
browser
.
title
)
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_recipe_name'
)
.
text
)
self
.
assertIn
(
''
,
self
.
browser
.
find_element_by_ID
(
'new_recipe_quantity'
)
.
text
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
(
warnings
=
'ignore'
)
unittest
.
main
(
warnings
=
'ignore'
)
\ No newline at end of file
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