Sha256: 1667502275bb212639ab45680793cfed15004a012536be997d9b662fb7167929

Contents?: true

Size: 477 Bytes

Versions: 9

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

require_relative "../rails_helper"

describe "Hello World", :js do
  it "the hello world example works" do
    visit "/hello_world"
    expect(heading).to have_text("Hello World")
    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

9 entries across 9 versions & 1 rubygems

Version Path
react_on_rails-14.1.1 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.1.0 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.1.0.rc.0 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-15.0.0.alpha.1 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.0.5 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.0.4 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.0.3 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.0.2 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
react_on_rails-14.0.0 lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb