<commit_before>require 'rubygems'
require 'test/unit'
require 'bewildr'

class BewildrTest < Test::Unit::TestCase
  def setup
    Bewildr::Application.kill_all_processes_with_name("BewildrTestApp")
    @app, @main_window = Bewildr::Application.start_app_and_wait_for_window("./features/support/BewildrTestApp.exe", /Bewildr/)
  end

  def test_button_click
    #select the 'basic' tab
    @main_window.get(:id => "main_tabs").select("basic")
    #click the button with automation id: 'enabled_button'
    @main_window.get(:id => "enabled_button").click
    #check to see if the button click worked
    assert @main_window.get(:id => "enabled_button_message").text == "clicked!"
  end

  def test_slider_move
    #select the 'bars' tab
    @main_window.get(:id => "main_tabs").select("bars")
    #move the slider
    @main_window.get(:id => "slider1").value = 7
    #check to see if the slider moved
    assert @main_window.get(:id => "slider1").value == 7
  end
end<commit_msg>adding comments for clarity<commit_after>require 'rubygems'
require 'test/unit'
require 'bewildr'

class BewildrTest < Test::Unit::TestCase
  def setup
    #make sure that the test app is not running - we want a clean slate
    Bewildr::Application.kill_all_processes_with_name("BewildrTestApp")

    #start the app and wait for the main window
    @app, @main_window = Bewildr::Application.start_app_and_wait_for_window("./features/support/BewildrTestApp.exe", /Bewildr/)
  end

  def test_button_click
    #select the 'basic' tab
    @main_window.get(:id => "main_tabs").select("basic")

    #click the button with automation id: 'enabled_button'
    @main_window.get(:id => "enabled_button").click

    #check to see if the button click worked
    assert @main_window.get(:id => "enabled_button_message").text == "clicked!"
  end

  def test_slider_move
    #select the 'bars' tab
    @main_window.get(:id => "main_tabs").select("bars")

    #move the slider
    @main_window.get(:id => "slider1").value = 7

    #check to see if the slider moved
    assert @main_window.get(:id => "slider1").value == 7
  end
end
{'fraction_non_alphanumeric': 0.12565695174390826, 'fraction_numerical': 0.003822264691829909, 'mean_word_length': 4.287878787878788, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5911423', 'n_tokens_mistral': 706, 'n_tokens_neox': 691, 'n_words': 173}