<commit_before># Test CRUD on posts for each application
class TestNew < Test::Unit::TestCase

  # Helps perform authentication with the content server
  require_relative "auth_helper"

  include AuthHelper # Helps with login/logout
  include Capybara::DSL # Provides for Webdriving

  def setup
  end

  # Test post creation for each application that presents a "new" action.
  def test_creating_posts
    @@privly_test_set.each do |to_test|
      if to_test[:manifest_dictionary]["action"] == "new" and
        not to_test[:manifest_dictionary]["name"] == "Help" and
        not to_test[:manifest_dictionary]["name"] == "Login"
        page.driver.browser.get(to_test[:url]); # Re-load the page after we set the server
        login(to_test[:content_server])
        fill_in 'content', :with =>  "Hello WebDriver!"
        click_on ('save')
        urls = page.find('.privlyUrl', :visible => true)
        assert urls.visible?
        logout
      end<commit_msg>removed random semicolon<commit_after># Test CRUD on posts for each application
class TestNew < Test::Unit::TestCase

  # Helps perform authentication with the content server
  require_relative "auth_helper"

  include AuthHelper # Helps with login/logout
  include Capybara::DSL # Provides for Webdriving

  def setup
  end

  # Test post creation for each application that presents a "new" action.
  def test_creating_posts
    @@privly_test_set.each do |to_test|
      if to_test[:manifest_dictionary]["action"] == "new" and
        not to_test[:manifest_dictionary]["name"] == "Help" and
        not to_test[:manifest_dictionary]["name"] == "Login"
        page.driver.browser.get(to_test[:url]) # Re-load the page after we set the server
        login(to_test[:content_server])
        fill_in 'content', :with =>  "Hello WebDriver!"
        click_on ('save')
        urls = page.find('.privlyUrl', :visible => true)
        assert urls.visible?
        logout
      end
{'fraction_non_alphanumeric': 0.10360824742268042, 'fraction_numerical': 0.0, 'mean_word_length': 3.4826789838337184, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4126205', 'n_tokens_mistral': 587, 'n_tokens_neox': 563, 'n_words': 171}