Commit d37959a2 authored by abbeeeeyyyyy's avatar abbeeeeyyyyy

Fixed the links in the html files

parent 625c9351
......@@ -19,21 +19,18 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
character_name = self.browser.find_element_by_tag_name('h1').text
health_points = self.browser.find_element_by_tag_name('dt').text
damage_points = self.browser.find_element_by_tag_name('dt').text
self.assertIn('Jester', character_name)
self.assertIn('660', health_points)
self.assertIn('64', damage_points)
self.assertIn('Jester', self.browser.find_element_by_id('jester'))
self.assertIn('660', self.browser.find_element_by_id('hp-jester'))
self.assertIn('64', self.browser.find_element_by_id('d-jester'))
self.assertIn('Cloud', character_name)
self.assertIn('600', health_points)
self.assertIn('57', damage_points)
self.assertIn('Cloud', self.browser.find_element_by_id('cloud'))
self.assertIn('600', self.browser.find_element_by_id('hp-cloud'))
self.assertIn('57', self.browser.find_element_by_id('d-cloud'))
self.assertIn('Sunflowey', character_name)
self.assertIn('650', health_points)
self.assertIn('43', damage_points)
self.assertIn('Sunflowey', self.browser.find_element_by_id('sunflowey'))
self.assertIn('650', self.browser.find_element_by_id('hp-sunflowey'))
self.assertIn('43', self.browser.find_element_by_id('d-sunflowey'))
# When she selects one of the heroes, she is sent to another page
......@@ -42,7 +39,6 @@ class NewVisitorTest(unittest.TestCase):
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)
......@@ -50,8 +46,39 @@ class NewVisitorTest(unittest.TestCase):
# 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()
# 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_element_by_link_text('Cloud')
link.click()
# She spots the page title and header mentions the name of the hero she selected.
self.assertIn('Detail - Cloud', self.browser.title)
self.assertIn('Detail - Cloud', 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()
# 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_element_by_link_text('Sunflowey')
link.click()
# She spots the page title and header mentions the name of the hero she selected.
self.assertIn('Detail - Sunflowey', self.browser.title)
self.assertIn('Detail - Suunflowey', 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!')
if __name__ == '__main__':
unittest.main(warnings='ignore')
\ No newline at end of file
......@@ -37,7 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'heroes'
'heroes',
]
MIDDLEWARE = [
......@@ -55,7 +55,9 @@ ROOT_URLCONF = 'willowisp.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
'templates'
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......
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