Commit 29b3bbee authored by abbeeeeyyyyy's avatar abbeeeeyyyyy

Finished the functional_test

parent 6ac90dd7
Pipeline #951 failed with stages
<!DOCTYPE html>
<html>
<head>
<title>Detail - Cloud</title>
</head>
<body>
<img src="./cloud.png" style="width: 10vw;" />
<h1>Detail - Cloud</h1>
<dl>
<dt>Health Points</dt><dd>600</dd>
<dt>Base Attack Damage</dt><dd>57</dd>
<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>
<img src="./cloud.png" style="width: 10vw;" />
<h1>Detail - Cloud</h1>
<dl>
<dt>Health Points</dt>
<dd>600</dd>
<dt>Base Attack Damage</dt>
<dd>57</dd>
<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 class='info' onclick="window.location.href = 'heroes.html';">Back to Heroes List</button>
</body>
</html>
\ No newline at end of file
......@@ -12,5 +12,6 @@
<dt>Skills</dt><dd>Laugh, Dance, Smile</dd>
<dt>Lore</dt><dd>I do it for the LOLs.</dd>
</dl>
<button class='info' onclick="window.location.href = 'heroes.html';">Back to Heroes List</button>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Detail - Sunflowey</title>
</head>
<body>
<img src="./sunflowey.png" style="width: 10vw;" />
<h1>Detail - Sunflowey</h1>
<dl>
<dt>Health Points</dt><dd>650</dd>
<dt>Base Attack Damage</dt><dd>43</dd>
<dt>Skills</dt><dd>Power Pellet, Sunshine, Pollen Punch</dd>
<dt>Lore</dt><dd>I am Sunflowey. Sometimes a sun, sometimes a flower.</dd>
</dl>
<img src="./sunflowey.png" style="width: 10vw;" />
<h1>Detail - Sunflowey</h1>
<dl>
<dt>Health Points</dt>
<dd>650</dd>
<dt>Base Attack Damage</dt>
<dd>43</dd>
<dt>Skills</dt>
<dd>Power Pellet, Sunshine, Pollen Punch</dd>
<dt>Lore</dt>
<dd>I am Sunflowey. Sometimes a sun, sometimes a flower.</dd>
</dl>
<button class='info' onclick="window.location.href = 'heroes.html';">Back to Heroes List</button>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title> The Will of the Wisps Wiki </title>
</head>
<body>
<h1> Will-O-Wisp Heroes </h1>
<h1>Jester</h1>
<dl>
<dt>Health Points</dt>
<dd>660</dd>
<dt>Base Attack Damage</dt>
<dd>64</dd>
</dl>
<button class='info' onclick="window.location.href = 'detail_jester.html';">More Information</button>
<h1>Cloud</h1>
<dl>
<dt>Health Points</dt>
<dd>600</dd>
<dt>Base Attack Damage</dt>
<dd>57</dd>
</dl>
<button class='info' onclick="window.location.href = 'detail_cloud.html';">More Information</button>
<h1>Sunflowey</h1>
<dl>
<dt>Health Points</dt>
<dd>650</dd>
<dt>Base Attack Damage</dt>
<dd>43</dd>
</dl>
<button class='info' onclick="window.location.href = 'detail_sunflowey.html';">More Information</button>
</body>
</html>
\ No newline at end of file
......@@ -23,12 +23,14 @@ class NewVisitorTest(unittest.TestCase):
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('Cloud', character_name)
self.assertIn('600', health_points)
self.assertIn('57', damage_points)
self.assertIn('Sunflowey', character_name)
self.assertIn('650', health_points)
self.assertIn('43', damage_points)
......@@ -36,14 +38,18 @@ class NewVisitorTest(unittest.TestCase):
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
link = self.browser.find_elements_by_id('jester-info').text
self.assertIn()
link = self.browser.find_element_by_link_text('Jester')
link.click()
# She spots the page title and header mentions the name of the hero she selected.
self.assertEquals('http://localhost:8000/hero/Jester', self.browser.current_url)
self.assertIn('Detail - Jester', self.browser.title)
self.assertIn('Detail - Jester', self.browser.find_element_by_tag_name('h1').text)
# 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.
homePageLink = self.browser.find_element_by_link_text('Back to Heroes List')
homePageLink.click()
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