Sha256: 372cb0b509f75af979d81ec48f25ea6df73fecb3fd3ff882ec83950c33b2c6be

Contents?: true

Size: 454 Bytes

Versions: 38

Compression:

Stored size: 454 Bytes

Contents

require_relative "../rails_helper"

feature "Hello World", js: true do
  scenario "the hello world example works" do
    visit "/hello_world"
    expect(heading).to have_text("Rendering")
    expect(message).to have_text("Stranger")
    name_input.set("John Doe")
    expect(message).to have_text("John Doe")
  end
end

private

def name_input
  page.first("input")
end

def message
  page.first(:css, "h3")
end

def heading
  page.first(:css, "h1")
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
react_on_rails-5.2.0 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-5.1.1 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-5.1.0 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-5.0.0 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-5.0.0.rc.1 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.3 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.2 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.1 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.0 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.0.beta.3 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.0.beta.2 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-4.0.0.beta.1 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.6 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.5 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.4 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.3 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.2 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.1 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.0 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
react_on_rails-3.0.0.rc.2 lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb