Commit dcc17ae2 authored by thisLexic's avatar thisLexic

created test for determining if the info in the home_page.html is correct

parent 25f42d67
This diff is collapsed.
......@@ -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>
......
......@@ -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
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