Sha256: 18332aae68dc75a34b1e31250dd14234cbf7d06af684bbb94c23061dc680d677

Contents?: true

Size: 704 Bytes

Versions: 14

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe "show only in edit mode span tags", js: true do

  before do
    @user = User.new( first_name: "John", last_name: "Doe", date_of_birth: "1995-12-21" )
    @user.save
    visit user_path( @user )
  end

  it "should not be visible when not in edit mode" do
    page.should_not have_selector( ".show_only_in_edit_mode", visible: true )
  end

  it "should be visible in edit mode" do
    click_on 'edit'
    page.should have_selector( ".show_only_in_edit_mode", visible: true )
  end

  it "should be invisible after exiting the edit mode" do
    click_on 'edit'
    click_on 'cancel'
    page.should_not have_selector( ".show_only_in_edit_mode", visible: true )
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
edit_mode-1.0.5 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-1.0.4 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-1.0.3 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-1.0.2 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-1.0.1 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-1.0.0 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.9 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.8 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.7 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.6 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.5 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.4 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.3 spec/integration/show_only_in_edit_mode_spec.rb
edit_mode-0.0.2 spec/integration/show_only_in_edit_mode_spec.rb