Commit 4a8109c4 authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Added the rest of the home page contents of the project and passed the test on the first try

parent 2d4383d2
from django.test import TestCase
from selenium import webdriver
import unittest
class CheckContents(unittest.TestCase):
class NewVisitorTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
def tearDown(self):
self.browser.quit()
def test_can_display_a_heroes_list_and_more_information_per_hero(self):
self.browser.get('http://localhost:8000/heroes')
homePageHeader = self.browser.find_element_by_id('homePageHeader')
self.assertEqual(homePageHeader.get_attribute('innerHTML'), 'The Will of the Wisps Wiki')
def check_cloud_in_home_page(self):
self.browser.get('http://localhost:8000')
......@@ -51,7 +62,8 @@ class CheckContents(unittest.TestCase):
sunfloweyHeader = self.browser.find_element_by_id('sunfloweyHeader')
self.assertEqual(sunfloweyHeader.get_attribute('innerHTML'), 'Detail - Sunflowey')
if __name__ == '__main__':
unittest.main(warnings='ignore')
......
......@@ -12,8 +12,8 @@ class NewVisitorTest(unittest.TestCase):
# Widget has heard about a new wiki app for the game called The Will of the Wisps.
# She goes to check out its homepage
self.browser.get('http://localhost:8000/heroes')
#homePageHeader = self.browser.find_element_by_id('homePageHeader')
#self.assertEqual(homePageHeader.get_attribute('innerHTML'), 'The Will of the Wisps Wiki')
homePageHeader = self.browser.find_element_by_id('homePageHeader')
self.assertEqual(homePageHeader.get_attribute('innerHTML'), 'The Will of the Wisps Wiki')
# She notices the page title and header mention
# 'The Will of the Wisps Wiki'
......
......@@ -6,5 +6,28 @@
<body>
<h1 id = "homePageHeader">The Will of the Wisps Wiki</h1>
<br>
<img src="./cloud.png" style="width: 10vw;" />
<h2 id = "cloudName">Cloud</h2>
<dl>
<dt>Health Points</dt><dd id = "cloudHealth">600</dd>
<dt>Base Attack Damage</dt><dd id = "cloudAttack">57</dd>
</dl>
<img src="./jester.png" style="width: 10vw;"/>
<h2 id = "jesterName">Jester</h2>
<dl>
<dt>Health Points</dt><dd id = "jesterHealth">660</dd>
<dt>Base Attack Damage</dt><dd id = "jesterAttack">64</dd>
</dl>
<img src="./sunflowey.png" style="width: 10vw;" />
<h2 id = "sunfloweyName">Sunflowey</h2>
<dl>
<dt>Health Points</dt><dd id = "sunfloweyHealth">650</dd>
<dt>Base Attack Damage</dt><dd id = "sunfloweyAttack">43</dd>
</dl>
</body>
</html>
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