Commit 58b2d792 authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Added a test for checking if the name, health, and attack stats can be seen in the home page

parent 82e87f1a
from django.test import TestCase
import unittest
class CheckContents(unittest.TestCase):
def check_cloud(self):
cloudName = self.browser.find_element_by_id('cloudName')
self.assertEqual(cloudName.get_attribute('innerHTML'), 'Cloud')
cloudHealth = self.browser.find_element_by_id('cloudHealth')
self.assertEqual(cloudHealth.get_attribute('innerHTML'), '600')
cloudAttack = self.browser.find_element_by_id('cloudAttack')
self.assertEqual(cloudAttack.get_attribute('innerHTML'), '57')
def check_jester(self):
jesterName = self.browser.find_element_by_id('jesterName')
self.assertEqual(jesterName.get_attribute('innerHTML'), 'Jester')
jesterHealth = self.browser.find_element_by_id('jesterHealth')
self.assertEqual(jesterHealth.get_attribute('innerHTML'), '660')
jesterAttack = self.browser.find_element_by_id('jesterAttack')
self.assertEqual(jesterAttak.get_attribute('innerHTML'), '64')
def check_sunflowey(self):
sunfloweyName = self.browser.find_element_by_id('sunfloweyName')
self.assertEqual(jesterName.get_attribute('innerHTML'), 'Sunflowey')
sunfloweyHealth = self.browser.find_element_by_id('sunfloweyHealth')
self.assertEqual(sunfloweyHealth.get_attribute('innerHTML'), '650')
sunfloweyAttack = self.browser.find_element_by_id('sunfloweyAttack')
self.assertEqual(sunfloweyAttack.get_attribute('innerHTML'),'43')
# Create your tests here.
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