import unittest

from selenium import webdriver


class NewVisitorTest(unittest.TestCase):
	def setUp(self):
		self.browser - webdriver.Firefox()

	def tearDown(self):
		self.browser.quit()

	def test_can_display_a_heroes_list_and_more_information_per_hero(self):
		# Laura looks at the status from a yogurt shop open during the quarantine called
		# The Good Place Froyo Shop. 
		# She decides to visit the shop's page:
		self.browser.get('http://localhost:8000')

		# She sees the page title and header mention 
		# 'The Good Place FroYo Shop'
		self.assertIn('The Good Place FroYo Shop', self.browser.title)
		
		# She sees 12 templates and decides to click on one.
		# When she selects one of the templates , she is sent to another page
		# containing the function of the template.
		template = self.browser.find_element_by_id('ingredients_list')
		template.click()
		time.sleep(1)

		self.assertEqual(
			'http://localhost:8000/froyo/ingredients_list',
			self.browser.getCurrentUrl()
		)

		self.fail('Finish the test!')

if __name__ == '__main__':
	unittest.main(warnings= 'ignore')