Class: CheckIn::Input
- Inherits:
-
Object
- Object
- CheckIn::Input
- Includes:
- RSpec::Expectations, RSpec::Matchers
- Defined in:
- lib/cucumber/pickles/steps/check_in/input.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label, value, within) ⇒ Input
constructor
A new instance of Input.
Constructor Details
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cucumber/pickles/steps/check_in/input.rb', line 12 def call case input.native.attribute("type") when "text" expect(input.value).to eq @value when "radio", "checkbox" case @value when "true", true expect(input).to be_selected when "false", false, nil expect(input).not_to be_selected end when "file" expect(page).to have_selector("[src$='#{@value}']") end end |