Sha256: 23d9c4bf2e7270de2014bf121a678bdcc796350653868d105c5d84d8965a8b7a

Contents?: true

Size: 734 Bytes

Versions: 5

Compression:

Stored size: 734 Bytes

Contents

require "rails_helper"

# javascript specs are slow, so test everything at
# once on a single page

feature "javascript", js: true do
  let(:name) { 'name' }
  let(:new_name) { 'namenamename?' }

  before do
    visit root_path(name: name)
  end

  it "should test all the things" do
    expect(find("#data-binding-div")).to have_content(name)
    expect(find("#bind-service-div")).to have_content("Hello #{name}")
    expect(find("#directive-div h1 h2")).to have_content(name)

    fill_in("Input", with: new_name)

    expect(find("#data-binding-div")).to have_content(new_name)
    expect(find("#bind-service-div")).to have_content("Hello #{new_name}")

    expect(find("#directive-div h1 h2")).to have_content(new_name)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
angular_sprinkles-0.0.9 spec/features/javascript_spec.rb
angular_sprinkles-0.0.8 spec/features/javascript_spec.rb
angular_sprinkles-0.0.7 spec/features/javascript_spec.rb
angular_sprinkles-0.0.6 spec/features/javascript_spec.rb
angular_sprinkles-0.0.5 spec/features/javascript_spec.rb