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
Christian Paul Penaflor
TheGoodPlace
Commits
5f512a89
Commit
5f512a89
authored
Mar 17, 2020
by
Christian Paul Penaflor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
functional test will now find if Ingredients in the home page is linked to the Ingredients list
parent
6aeee73a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
functional_tests.py
functional_tests.py
+11
-0
No files found.
functional_tests.py
View file @
5f512a89
from
selenium
import
webdriver
from
selenium
import
webdriver
import
unittest
import
unittest
import
time
class
NewVisitorTest
(
unittest
.
TestCase
):
class
NewVisitorTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
@@ -14,7 +15,17 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -14,7 +15,17 @@ class NewVisitorTest(unittest.TestCase):
# Check if the title of the homepage is Let's Make Froyo
# Check if the title of the homepage is Let's Make Froyo
self
.
assertIn
(
'Lets Make Froyo'
,
self
.
browser
.
title
)
self
.
assertIn
(
'Lets Make Froyo'
,
self
.
browser
.
title
)
# Check if Ingredients is available and select it to see the list of the Ingredients
Ingredients
=
self
.
browser
.
find_element_by_id
(
'Ingredients'
)
self
.
assertEqual
(
Ingredients
.
get_attribute
(
'innerHTML'
),
'Ingredients'
)
Ingredients
.
click
()
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/froyo/ingredients_list"
,
self
.
browser
.
getCurrentUr
()
)
self
.
fail
(
'Finish the test!'
)
self
.
fail
(
'Finish the test!'
)
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