Commit f449ac2c authored by jiroto26's avatar jiroto26

edited lab1_functional_test.py to completion

parent 8d5a0d0e
Pipeline #955 failed with stages
...@@ -19,11 +19,30 @@ class NewVisitorTest(unittest.TestCase): ...@@ -19,11 +19,30 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding # She sees a list containing three heroes with their corresponding
# names, health points, and damage # names, health points, and damage
self.assertTrue(self.browser.find_element_by_id("heroname_cloud"))
self.assertTrue(self.browser.find_element_by_id("healthstatus_cloud"))
self.assertTrue(self.browser.find_element_by_id("attackstatus_cloud"))
self.assertTrue(self.browser.find_element_by_id("heroname_jester"))
self.assertTrue(self.browser.find_element_by_id("healthstatus_jester"))
self.assertTrue(self.browser.find_element_by_id("attackstatus_jester"))
self.assertTrue(self.browser.find_element_by_id("heroname_sunflowey"))
self.assertTrue(self.browser.find_element_by_id("healthstatus_sunflowey"))
self.assertTrue(self.browser.find_element_by_id("attackstatus_sunflowey"))
# 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).
response = self.client.get('hero/cloud')
self.assertTemplateUsed(response,'detail_cloud.html')
# 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)
self.assertIn('Back to Heroes',html)
# 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.
......
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