Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willowisp
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
Bienvenido Villabroza
willowisp
Commits
dcc17ae2
Commit
dcc17ae2
authored
Mar 07, 2020
by
thisLexic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created test for determining if the info in the home_page.html is correct
parent
25f42d67
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
180 additions
and
9 deletions
+180
-9
geckodriver.log
willowisp/geckodriver.log
+146
-0
tests.cpython-37.pyc
willowisp/heroes/__pycache__/tests.cpython-37.pyc
+0
-0
home_page.html
willowisp/heroes/templates/heroes/home_page.html
+9
-9
tests.py
willowisp/heroes/tests.py
+25
-0
No files found.
willowisp/geckodriver.log
View file @
dcc17ae2
This diff is collapsed.
Click to expand it.
willowisp/heroes/__pycache__/tests.cpython-37.pyc
View file @
dcc17ae2
No preview for this file type
willowisp/heroes/templates/heroes/home_page.html
View file @
dcc17ae2
...
...
@@ -5,24 +5,24 @@
</head>
<body>
<h1
><a
id=
"cName"
>
Cloud
</a>
</h1>
<h1
id=
"cName"
>
Cloud
</h1>
<dl>
<dt
id=
"cHealth"
>
Health Points
</dt><dd
>
600
</dd>
<dt
id=
"cAttack"
>
Base Attack Damage
</dt><dd
>
57
</dd>
<dt
>
Health Points
</dt><dd
id=
"cHealth"
>
600
</dd>
<dt
>
Base Attack Damage
</dt><dd
id=
"cAttack"
>
57
</dd>
</dl>
<h1
><a
id=
"jName"
>
Jester
</a>
</h1>
<h1
id=
"jName"
>
Jester
</h1>
<dl>
<dt
id=
"jHealth"
>
Health Points
</dt><dd
>
660
</dd>
<dt
id=
"jAttack"
>
Base Attack Damage
</dt><dd
>
64
</dd>
<dt
>
Health Points
</dt><dd
id=
"jHealth"
>
660
</dd>
<dt
>
Base Attack Damage
</dt><dd
id=
"jAttack"
>
64
</dd>
</dl>
<h1
><a
id=
"sName"
>
Sunflowey
</a>
</h1>
<h1
id=
"sName"
>
Sunflowey
</h1>
<dl>
<dt
id=
"sHealth"
>
Health Points
</dt><dd
>
650
</dd>
<dt
id=
"sAttack"
>
Base Attack Damage
</dt><dd
>
43
</dd>
<dt
>
Health Points
</dt><dd
id=
"sHealth"
>
650
</dd>
<dt
>
Base Attack Damage
</dt><dd
id=
"sAttack"
>
43
</dd>
</dl>
</body>
...
...
willowisp/heroes/tests.py
View file @
dcc17ae2
...
...
@@ -18,5 +18,30 @@ class NewVisitorTest(unittest.TestCase):
# 'The Will of the Wisps Wiki'
self
.
assertIn
(
'The Will of the Wisps Wiki'
,
self
.
browser
.
title
)
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
detail
=
self
.
browser
.
find_element_by_id
(
'cName'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Cloud'
)
detail
=
self
.
browser
.
find_element_by_id
(
'cHealth'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'600'
)
detail
=
self
.
browser
.
find_element_by_id
(
'cAttack'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'57'
)
detail
=
self
.
browser
.
find_element_by_id
(
'jName'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Jester'
)
detail
=
self
.
browser
.
find_element_by_id
(
'jHealth'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'660'
)
detail
=
self
.
browser
.
find_element_by_id
(
'jAttack'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'64'
)
detail
=
self
.
browser
.
find_element_by_id
(
'sName'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Sunflowey'
)
detail
=
self
.
browser
.
find_element_by_id
(
'sHealth'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'650'
)
detail
=
self
.
browser
.
find_element_by_id
(
'sAttack'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'43'
)
self
.
fail
(
'Finish the test!'
)
\ 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