Sha256: 4ea4c19bb1db0ff4ee169870bbef7c604da501f84335bec36e6d32fbecd265e2

Contents?: true

Size: 641 Bytes

Versions: 18

Compression:

Stored size: 641 Bytes

Contents

step 'I am on the :path' do |path|
  visit path
end

step 'I should see :text' do |text|
  expect(page).to have_content(text)
end

step 'I should not see :text' do |text|
  expect(page).not_to have_content(text)
end

step 'type :text to :field' do |text, field|
  fill_in field, with: text
end

step 'typed :field with :text' do |field, text|
  expect(page).to have_field(field, with: text)
end

step 'click :button' do |button|
  click_button button
end

step ':text confirm is :choice' do |text, choice|
  dialog = page.driver.browser.switch_to.alert
  expect(dialog.text).to eq text

  choice == 'ok' ? dialog.accept : dialog.dismiss
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gnawrnip-0.8.0 example/spec/steps/hello_steps.rb
gnawrnip-0.7.0 example/spec/steps/hello_steps.rb
gnawrnip-0.6.0 example/spec/steps/hello_steps.rb
gnawrnip-0.5.0 example/spec/steps/hello_steps.rb
gnawrnip-0.4.0 example/spec/steps/hello_steps.rb
gnawrnip-0.3.2 example/spec/steps/hello_steps.rb
gnawrnip-0.3.1 example/spec/steps/hello_steps.rb
gnawrnip-0.3.0 example/spec/steps/hello_steps.rb
gnawrnip-0.2.5 example/spec/steps/hello_steps.rb
gnawrnip-0.2.4 example/spec/steps/hello_steps.rb
gnawrnip-0.2.3 example/spec/steps/hello_steps.rb
gnawrnip-0.2.2 example/spec/steps/hello_steps.rb
gnawrnip-0.2.1 example/spec/steps/hello_steps.rb
gnawrnip-0.2.0 example/spec/steps/hello_steps.rb
gnawrnip-0.1.3 example/spec/steps/hello_steps.rb
gnawrnip-0.1.2 example/spec/steps/hello_steps.rb
gnawrnip-0.1.1 example/spec/steps/hello_steps.rb
gnawrnip-0.1.0 example/spec/steps/hello_steps.rb