Commit d184cb4a authored by Santino Campos's avatar Santino Campos

Add functional test for sunflowey hero page

parent d0a70820
...@@ -24,7 +24,29 @@ class NewVisitorTest(unittest.TestCase): ...@@ -24,7 +24,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/sunflowey')
self.assertIn('Detail - Sunflowey', self.browser.title)
self.assertIn('
<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>
</body>
</html>
', self.browser.page_source)
# 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.
# 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".
......
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