<commit_before>require File.expand_path('../../watirspec_helper', __FILE__)

describe 'Browser' do

  # Note: This method is deprecated, but still needs to be tested.
  describe '#opera_action' do
    it 'executes the specified action' do
      browser.url = fixture('input_fields_value.html')
      window.find_by_id('one').click
      browser.opera_action('Select all')
      window.eval_js('one = document.getElementById("one");')
    window.eval_js('one.value.substr(one.selectionStart, one.selectionEnd - one.selectionStart)').to_s.should == 'foobar'
    end
  end

  # Note: This method is deprecated, but still needs to be tested.
  describe '#opera_action_list' do
    it 'returns a list of available Opera actions' do
      browser.url = 'about:blank'
      browser.opera_action_list.should include 'Copy'
      browser.opera_action_list.should include 'Paste'
    end
  end

  # Note: This method is deprecated, but still needs to be tested.
  describe '#key' do
    it 'presses the specified key' do
      browser.url = fixture('two_input_fields.html')
      window.find_by_name('one').click
      browser.key 'a'
      window.find_by_name('one').value.should == 'a'
    end
  end
<commit_msg>The opera_action_list is now case sensitive<commit_after>require File.expand_path('../../watirspec_helper', __FILE__)

describe 'Browser' do

  # Note: This method is deprecated, but still needs to be tested.
  describe '#opera_action' do
    it 'executes the specified action' do
      browser.url = fixture('input_fields_value.html')
      window.find_by_id('one').click
      browser.opera_action('Select all')
      window.eval_js('one = document.getElementById("one");')
    window.eval_js('one.value.substr(one.selectionStart, one.selectionEnd - one.selectionStart)').to_s.should == 'foobar'
    end
  end

  # Note: This method is deprecated, but still needs to be tested.
  describe '#opera_action_list' do
    it 'returns a list of available Opera actions' do
      browser.url = 'about:blank'
      browser.opera_action_list.should include 'copy'
      browser.opera_action_list.should include 'paste'
    end
  end

  # Note: This method is deprecated, but still needs to be tested.
  describe '#key' do
    it 'presses the specified key' do
      browser.url = fixture('two_input_fields.html')
      window.find_by_name('one').click
      browser.key 'a'
      window.find_by_name('one').value.should == 'a'
    end
  end

{'fraction_non_alphanumeric': 0.10992616899097621, 'fraction_numerical': 0.0, 'mean_word_length': 3.533457249070632, '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': '3936031', 'n_tokens_mistral': 756, 'n_tokens_neox': 736, 'n_words': 207}