Commit 9c70818d authored by Carlowsss's avatar Carlowsss

Edited html files to pass functional tests

parent b01faf5d
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Detail - Cloud</title> <title>Detail - Cloud</title>
</head> </head>
<body> <body>
<img src="./cloud.png" style="width: 10vw;" /> <img src="./cloud.png" style="width: 10vw;" />
<h1>Detail - Cloud</h1> <h1><a href="/hero/cloud">Detail - Cloud</a></h1>
<dl>
<dt>Health Points</dt><dd>600</dd> <dl>
<dt>Base Attack Damage</dt><dd>57</dd> <dt>Health Points</dt>
<dt>Skills</dt><dd>Nimbus, Rain Cloud, Thunderbolt</dd> <dd>600</dd>
<dt>Lore</dt><dd>I am a cloud. When I pee you call it 'rain'.</dd> <dt>Base Attack Damage</dt>
</dl> <dd>57</dd>
</body> <dt>Skills</dt>
<dd>Nimbus, Rain Cloud, Thunderbolt</dd>
<dt>Lore</dt>
<dd>I am a cloud. When I pee you call it 'rain'.</dd>
</dl>
<button><a href="/heroes">Back to Home</a></button>
</body>
</html> </html>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Detail - Jester</title> <title>Detail - Jester</title>
</head> </head>
<body> <body>
<img src="./jester.png" style="width: 10vw;"/> <img src="./jester.png" style="width: 10vw;" />
<h1>Detail - Jester</h1> <h1><a href="/hero/jester">Detail - Jester</a></h1>
<dl>
<dt>Health Points</dt><dd>660</dd> <dl>
<dt>Base Attack Damage</dt><dd>64</dd> <dt>Health Points</dt>
<dt>Skills</dt><dd>Laugh, Dance, Smile</dd> <dd>660</dd>
<dt>Lore</dt><dd>I do it for the LOLs.</dd> <dt>Base Attack Damage</dt>
</dl> <dd>64</dd>
</body> <dt>Skills</dt>
<dd>Laugh, Dance, Smile</dd>
<dt>Lore</dt>
<dd>I do it for the LOLs.</dd>
</dl>
<button><a href="/heroes">Back to Home</a></button>
</body>
</html> </html>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Detail - Sunflowey</title> <title>Detail - Sunflowey</title>
</head> </head>
<body> <body>
<img src="./sunflowey.png" style="width: 10vw;" /> <img src="./sunflowey.png" style="width: 10vw;" />
<h1>Detail - Sunflowey</h1> <h1><a href="/hero/sunflowey">Detail - Sunflowey</a></h1>
<dl> <dl>
<dt>Health Points</dt><dd>650</dd> <dt>Health Points</dt>
<dt>Base Attack Damage</dt><dd>43</dd> <dd>650</dd>
<dt>Skills</dt><dd>Power Pellet, Sunshine, Pollen Punch</dd> <dt>Base Attack Damage</dt>
<dt>Lore</dt><dd>I am Sunflowey. Sometimes a sun, sometimes a flower.</dd> <dd>43</dd>
</dl> <dt>Skills</dt>
</body> <dd>Power Pellet, Sunshine, Pollen Punch</dd>
<dt>Lore</dt>
<dd>I am Sunflowey. Sometimes a sun, sometimes a flower.</dd>
</dl>
<button><a href="/heroes">Back to Home</a></button>
</body>
</html> </html>
...@@ -2,5 +2,27 @@ ...@@ -2,5 +2,27 @@
<head> <head>
<title>The Will of the Wisps Wiki</title> <title>The Will of the Wisps Wiki</title>
</head> </head>
<body></body> <body>
<h1><a href="/hero/cloud">Cloud</a></h1>
<dl>
<dt>Health Points</dt>
<dd>600</dd>
<dt>Base Attack Damage</dt>
<dd>57</dd>
</dl>
<h1><a href="/hero/sunflowey">Sunflowey</a></h1>
<dl>
<dt>Health Points</dt>
<dd>650</dd>
<dt>Base Attack Damage</dt>
<dd>43</dd>
</dl>
<h1><a href="/hero/jester">Jester</a></h1>
<dl>
<dt>Health Points</dt>
<dd>660</dd>
<dt>Base Attack Damage</dt>
<dd>64</dd>
</dl>
</body>
</html> </html>
...@@ -4,4 +4,7 @@ from .views import heroes_home, cloud_hero, jester_hero, sunflowey_hero ...@@ -4,4 +4,7 @@ from .views import heroes_home, cloud_hero, jester_hero, sunflowey_hero
urlpatterns = [ urlpatterns = [
url(r'^heroes$', heroes_home, name='hero_home'), url(r'^heroes$', heroes_home, name='hero_home'),
url(r'^hero/cloud$', cloud_hero, name='cloud_hero'),
url(r'^hero/sunflowey$', sunflowey_hero, name='sunflowey_hero'),
url(r'^hero/jester$', jester_hero, name='jester_hero'),
] ]
\ No newline at end of file
...@@ -10,4 +10,4 @@ def jester_hero(request): ...@@ -10,4 +10,4 @@ def jester_hero(request):
return render(request, 'detail_jester.html') return render(request, 'detail_jester.html')
def sunflowey_hero(request): def sunflowey_hero(request):
return render(request, 'sunflowey_hero.html') return render(request, 'detail_sunflowey.html')
...@@ -22,11 +22,29 @@ class NewVisitorTest(unittest.TestCase): ...@@ -22,11 +22,29 @@ class NewVisitorTest(unittest.TestCase):
# 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).
self.browser.get('http://localhost:8000/hero/cloud')
# 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.
self.assertIn('Detail - Cloud', self.browser.title)
hero_header = self.browser.find_elements_by_tag_name("h1")
self.assertTrue(hero_header == 'Detail - Cloud')
# While she is in a specific hero's page, she sees a button labeled "Back to Heroes List". # While she is in a specific hero's page, she sees a button labeled "Back to Heroes List".
# 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.assertTrue(self.browser.find_elements_by_tag_name("button"))
self.browser.get('http://localhost:8000/heroes')
# She then looks at the rest of the heroes and goes back to the wiki's homepage.
self.browser.get('http://localhost:8000/hero/sunflowey')
self.assertIn('Detail - Sunflowey', self.browser.title)
self.assertTrue(self.browser.find_elements_by_tag_name("button"))
self.browser.get('http://localhost:8000/heroes')
self.browser.get('http://localhost:8000/hero/jester')
self.assertIn('Detail - Jester', self.browser.title)
self.assertTrue(self.browser.find_elements_by_tag_name("button"))
self.browser.get('http://localhost:8000/heroes')
self.fail('Finish the test!') self.fail('Finish the test!')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment