summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Taylor <jackson@jacksontaylor.xyz>2021-07-23 16:36:36 -0400
committerJackson Taylor <jackson@jacksontaylor.xyz>2021-07-23 16:36:36 -0400
commit572c9269a32531c64494889e0538a95ec6d67fe7 (patch)
treec7691300c6489a9edf6a215240bcd5561bfc27e9
parent9a359120b8ef626e3762556a54bafee8363baf7a (diff)
First FT specced in comments, now uses unittestHEADmaster
-rw-r--r--functional_tests.py40
1 files changed, 37 insertions, 3 deletions
diff --git a/functional_tests.py b/functional_tests.py
index d9f9595..d2cf17a 100644
--- a/functional_tests.py
+++ b/functional_tests.py
@@ -1,6 +1,40 @@
from selenium import webdriver
+import unittest
-browser = webdriver.Firefox()
-browser.get('http://localhost:8000')
+class NewVisitorTest(unittest.TestCase):
+ def setUp(self):
+ self.browser = webdriver.Firefox()
-assert 'Django' in browser.title \ No newline at end of file
+ def tearDown(self):
+ self.browser.quit()
+
+ def test_can_start_a_list_and_retrieve_it_later(self):
+ # Edith has heard about a cool new online to-do app. She goes to check out its
+ # homepage
+ self.browser.get('http://localhost:8000')
+
+ # She notices the page title and header mention to-do lists
+ self.assertIn('To-Do', self.browser.title)
+ self.fail('Finish the test!')
+
+ # She is invited to enter a to-do item
+
+ # She types 'Buy peacock feathers' into a text box
+
+ # When she hits enter, the page updates, and now the page lists
+ # "1: Buy peacock featers"
+
+ # There is still a text box for her to enter more todos
+ # She enters 'Use peacock feathers to make a fly'
+
+ # The page updates again and now shows both items in her list
+
+ # Edith sees there is a unique url for her to come back to this list later on
+
+ # She goes to that url and her list is still there!
+
+ # She gets off the internet for today
+
+
+if __name__ == '__main__':
+ unittest.main(warnings='ignore')