<commit_before>#encoding: utf-8
require 'spec_helper'

describe 'see form elements - checkboxes' do
  before do
    Capybara.app = Hey.new('form_elements.html')
    @user = Kameleon::User::Guest.new(self)
  end

  it 'should verify checked status by label' do
    @user.see :checked => 'Option two can also be checked and included in form results'
    @user.not_see :checked => "Option one is this and that—be sure to include why it's great"
  end

  it 'should verify checked status by name' do
    @user.see :checked => 'optionsCheckboxes_two'
    @user.not_see :checked => 'optionsCheckboxes_one'
  end

  it 'should verify unchecked status by label' do
    @user.see :unchecked => "Option one is this and that—be sure to include why it's great"
    @user.not_see :unchecked => 'Option two can also be checked and included in form results'
  end

  it 'should verify unchecked status by name' do
    @user.see :unchecked => 'optionsCheckboxes_one'
    @user.not_see :unchecked => 'optionsCheckboxes_two'
  end

  context 'when verify many checkboxes at once' do
    it 'should verify status checked' do
      @user.see :checked => ['Appended checkbox', 'appendedInput', 'optionsCheckboxes_two']
      @user.not_see :checked => ['optionsCheckboxes_one', 'optionsCheckboxes_three']
    end

    it 'should verify status unchecked' do
      @user.see :unchecked => ['Prepended checkbox', 'optionsCheckboxes', 'optionsCheckboxes_one']
      @user.not_see :unchecked => ['Appended checkbox', 'appendedInput', 'optionsCheckboxes_two']
    end

    context 'when at least one has other status than other checkboxes' do
      it 'should raise error' do
        expect do
          @user.see :checked =>['Appended checkbox', 'appendedInput', 'optionsCheckboxes_one']
        end.to raise_error(RSpec::Expectations::ExpectationNotMetError)
      end
    end
  end
end<commit_msg>Updated specs for checkboxes.<commit_after>#encoding: utf-8
require 'spec_helper'

describe 'see form elements - checkboxes' do
  before do
    Capybara.app = Hey.new('form_elements.html')
    @user = Kameleon::User::Guest.new(self)
  end

  context 'when status checked' do
    it 'should verify by label' do
      @user.see :checked => 'Option two can also be checked and included in form results'
      @user.not_see :checked => "Option one is this and that—be sure to include why it's great"
    end

    it 'should verify by name' do
      @user.see :checked => 'optionsCheckboxes_two'
      @user.not_see :checked => 'optionsCheckboxes_one'
    end

    it 'should verify many at once' do
      @user.see :checked => ['Appended checkbox', 'appendedInput', 'optionsCheckboxes_two']
      @user.not_see :checked => ['optionsCheckboxes_one', 'optionsCheckboxes_three']
    end
  end

  context 'when status unchecked' do
    it 'should verify by label' do
      @user.see :unchecked => "Option one is this and that—be sure to include why it's great"
      @user.not_see :unchecked => 'Option two can also be checked and included in form results'
    end

    it 'should verify by name' do
      @user.see :unchecked => 'optionsCheckboxes_one'
      @user.not_see :unchecked => 'optionsCheckboxes_two'
    end

    it 'should verify many at once' do
      @user.see :unchecked => ['Prepended checkbox', 'optionsCheckboxes', 'optionsCheckboxes_one']
      @user.not_see :unchecked => ['Appended checkbox', 'appendedInput', 'optionsCheckboxes_two']
    end
  end

  context 'when at least one has other status than other checkboxes' do
    it 'should raise error' do
      expect do
        @user.see :checked =>['Appended checkbox', 'appendedInput', 'optionsCheckboxes_one']
      end.to raise_error(RSpec::Expectations::ExpectationNotMetError)
    end
  end
end
{'fraction_non_alphanumeric': 0.0998661311914324, 'fraction_numerical': 0.000535475234270415, 'mean_word_length': 3.693467336683417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, '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': '5555290', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1094, 'n_words': 387}