Sha256: 0ebd69173aba363c322ba5f527a1896ad4f0f32de851ad755ad7f7683ed79ce8

Contents?: true

Size: 1.28 KB

Versions: 21

Compression:

Stored size: 1.28 KB

Contents

require 'spec_helper'

describe "Win32::RadioButton", :if => SpecHelper.adapter == :win_32 do
  it "#exist?" do
    RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option 1").should exist

    RAutomation::Window.wait_timeout = 0.1
    expect {RAutomation::Window.new(:title => "non-existent-window").
            radio(:value => "Option 1")}.
            to raise_exception(RAutomation::UnknownWindowException)
  end

  it "#set? & #set" do
    radio = RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option 1")
    radio.should_not be_set

    radio.set
    radio.should be_set
  end

  it "enabled/disabled" do
    RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option 1").should be_enabled
    RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option 1").should_not be_disabled

    RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option Disabled").should_not be_enabled
    RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option Disabled").should be_disabled
  end

  it "cannot set a disabled radio button" do
    lambda { RAutomation::Window.new(:title => "MainFormWindow").radio(:value => "Option Disabled").set }.should raise_error
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rautomation-1.1.0 spec/adapter/win_32/radio_spec.rb
rautomation-1.0.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.17.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.16.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.15.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.14.1 spec/adapter/win_32/radio_spec.rb
rautomation-0.14.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.13.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.12.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.11.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.10.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.9.4 spec/adapter/win_32/radio_spec.rb
rautomation-0.9.3 spec/adapter/win_32/radio_spec.rb
rautomation-0.9.2 spec/adapter/win_32/radio_spec.rb
rautomation-0.9.1 spec/adapter/win_32/radio_spec.rb
rautomation-0.9.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.8.0 spec/adapter/win_32/radio_spec.rb
rautomation-0.7.3 spec/adapter/win_32/radio_spec.rb
rautomation-0.7.2 spec/adapter/win_32/radio_spec.rb
rautomation-0.7.1 spec/adapter/win_32/radio_spec.rb