<commit_before>""" Functional test suite
"""
import unittest
from selenium import webdriver

class NewVisitorTest(unittest.TestCase):
  """ Tells story of a new visitor to the site
  """

  def setUp(self):
    self.browser = webdriver.Firefox()
    self.browser.implicitly_wait(3)

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

  def test_upload_and_view_result(self):
    """Navigate to uploads, enter results
    """
    # Mitchell visits the homepage of a results app
    self.browser.get('http://localhost:5000')

    #Seeing the page title lets him know he's in the right place
    self.assertIn('BugBug', self.browser.title)
    self.fail("Finish the test!")

    #He clicks a button to upload new results and is taken to the uploads
    #page.  He enters a url pointing to results, and clicks the upload
    #button.  After a series of confirmation screens, this takes him to
    #the parsed results page.

if __name__ == '__main__':
  unittest.main()<commit_msg>Functional tests now checks for uploads button<commit_after>""" Functional test suite
"""
import unittest
from selenium import webdriver

class NewVisitorTest(unittest.TestCase):
  """ Tells story of a new visitor to the site
  """

  def setUp(self):
    self.browser = webdriver.Firefox()
    self.browser.implicitly_wait(3)

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

  def test_upload_and_view_result(self):
    """Navigate to uploads, enter results
    """
    # Mitchell visits the homepage of a results app
    self.browser.get('http://localhost:5000')

    #Seeing the page title lets him know he's in the right place
    self.assertIn('BugBug', self.browser.title)
    header_text = self.browser.find_element_by_tag_name('h1').text
    self.assertIn('Explore', header_text)

    #He clicks a button to upload new results
    uploadbutton = self.browser.find_element_by_id('upload_button')
    self.assertEqual(
        uploadbutton.get_attribute('val'),
        'Uploads'
        )
    #and is taken to the uploads
    #page.  He enters a url pointing to results, and clicks the upload
    #button.  After a series of confirmation screens, this takes him to
    #the parsed results page.

    self.fail("Finish the test!")

if __name__ == '__main__':
  unittest.main()
{'fraction_non_alphanumeric': 0.09631602308033733, 'fraction_numerical': 0.004882379050155349, 'mean_word_length': 3.6, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7616789', 'n_tokens_mistral': 697, 'n_tokens_neox': 656, 'n_words': 228}