Sha256: bf23fad2ffa53e1a15c4add9b60373c4ecd0c1223b0720f0b7f4c33a67d7e053

Contents?: true

Size: 749 Bytes

Versions: 37

Compression:

Stored size: 749 Bytes

Contents

steps_for :search_with_table do
  step "I am within wikipedia.com" do
  end

  step "I am on wikipedia.com" do
    visit('/')
  end

  step "I have the following data:" do |table|
    @test_data = {}

    table.hashes.each do |hash|
      @test_data[hash['key']] = hash['value']
    end
  end

  step ":key should be :value" do |key, value|
    expect(@test_data[key]).to eq value
  end

  step "I should see <:key>" do |key|
    expect(page).to have_content @test_data[key]
  end

  step "I enter word <:key>" do |key|
    fill_in "searchInput", :with => @test_data[key]
  end

  step "I click submit button" do
    find(".formBtn", match: :first).click
  end

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

end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
acceptance_test-1.10.2 spec/wikipedia/support/steps/search_with_table_steps.rb
acceptance_test-1.10.1 spec/wikipedia/support/steps/search_with_table_steps.rb
acceptance_test-1.10.0 spec/wikipedia/support/steps/search_with_table_steps.rb
acceptance_test-1.9.13 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.12 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.11 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.10 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.9 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.8 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.7 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.6 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.5 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.4 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.3 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.2 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.9.1 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.8.7 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.8.6 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.8.5 spec/support/steps/search_with_table_steps.rb
acceptance_test-1.8.4 spec/support/steps/search_with_table_steps.rb