Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
Lab1-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
Abigail Moreno
Lab1-Willowisp
Commits
6ac90dd7
Commit
6ac90dd7
authored
Mar 10, 2020
by
abbeeeeyyyyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First error
parent
0549caef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
home.html
willowisp/home.html
+4
-4
lab1_functional_test.py
willowisp/lab1_functional_test.py
+22
-3
No files found.
willowisp/home.html
View file @
6ac90dd7
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<dd>
64
</dd>
<dd>
64
</dd>
</dl>
</dl>
<button
onclick=
"window.location.href = 'detail_jester.html';"
>
More Information
</button>
<button
class=
'info'
onclick=
"window.location.href = 'detail_jester.html';"
>
More Information
</button>
<h1>
Cloud
</h1>
<h1>
Cloud
</h1>
<dl>
<dl>
<dt>
Health Points
</dt>
<dt>
Health Points
</dt>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<dt>
Base Attack Damage
</dt>
<dt>
Base Attack Damage
</dt>
<dd>
57
</dd>
<dd>
57
</dd>
</dl>
</dl>
<button
onclick=
"window.location.href = 'detail_cloud.html';"
>
More Information
</button>
<button
class=
'info'
onclick=
"window.location.href = 'detail_cloud.html';"
>
More Information
</button>
<h1>
Sunflowey
</h1>
<h1>
Sunflowey
</h1>
<dl>
<dl>
<dt>
Health Points
</dt>
<dt>
Health Points
</dt>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<dt>
Base Attack Damage
</dt>
<dt>
Base Attack Damage
</dt>
<dd>
43
</dd>
<dd>
43
</dd>
</dl>
</dl>
<button
onclick=
"window.location.href = 'detail_sunflowey.html';"
>
More Information
</button>
<button
class=
'info'
onclick=
"window.location.href = 'detail_sunflowey.html';"
>
More Information
</button>
</body>
</body>
</html>
</html>
\ No newline at end of file
willowisp/lab1_functional_test.py
View file @
6ac90dd7
...
@@ -11,7 +11,7 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -11,7 +11,7 @@ class NewVisitorTest(unittest.TestCase):
def
test_can_display_a_heroes_list_and_more_information_per_hero
(
self
):
def
test_can_display_a_heroes_list_and_more_information_per_hero
(
self
):
# Widget has heard about a new wiki app for the game called The Will of the Wisps.
# Widget has heard about a new wiki app for the game called The Will of the Wisps.
# She goes to check out its homepage
# She goes to check out its homepage
browser
.
get
(
'http://localhost:8000'
)
self
.
browser
.
get
(
'http://localhost:8000'
)
# She notices the page title and header mention
# She notices the page title and header mention
# 'The Will of the Wisps Wiki'
# 'The Will of the Wisps Wiki'
...
@@ -19,10 +19,25 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -19,10 +19,25 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
# names, health points, and damage
self
.
assertIn
(
'Cloud'
,)
character_name
=
self
.
browser
.
find_element_by_tag_name
(
'h1'
)
.
text
health_points
=
self
.
browser
.
find_element_by_tag_name
(
'dt'
)
.
text
damage_points
=
self
.
browser
.
find_element_by_tag_name
(
'dt'
)
.
text
self
.
assertIn
(
'Cloud'
,
character_name
)
self
.
assertIn
(
'600'
,
health_points
)
self
.
assertIn
(
'57'
,
damage_points
)
self
.
assertIn
(
'Jester'
,
character_name
)
self
.
assertIn
(
'660'
,
health_points
)
self
.
assertIn
(
'64'
,
damage_points
)
self
.
assertIn
(
'Sunflowey'
,
character_name
)
self
.
assertIn
(
'650'
,
health_points
)
self
.
assertIn
(
'43'
,
damage_points
)
# When she selects one of the heroes, she is sent to another page
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
# containing more information about the hero (additional stats, lore, image).
link
=
self
.
browser
.
find_elements_by_id
(
'jester-info'
)
.
text
self
.
assertIn
()
# She spots the page title and header mentions the name of the hero she selected.
# She spots the page title and header mentions the name of the hero she selected.
...
@@ -30,3 +45,7 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -30,3 +45,7 @@ class NewVisitorTest(unittest.TestCase):
# She clicks this and she is redirected back to the wiki's homepage.
# She clicks this and she is redirected back to the wiki's homepage.
self
.
fail
(
'Finish the test!'
)
self
.
fail
(
'Finish the test!'
)
if
__name__
==
'__main__'
:
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