Sha256: 81c669ec1d1012a9a71170554b6183c4ba1167e30f545325bc83954028790b7e

Contents?: true

Size: 1.63 KB

Versions: 13

Compression:

Stored size: 1.63 KB

Contents

require File.expand_path("../integration_test_helper", File.dirname(__FILE__))
 
class SubtabsTest < ActionController::IntegrationTest
 
  test "viewing subtabs application" do
    visit '/'
    assert page.has_content?('Explanation')
  end
 
  test "displaying subtabs" do
    visit '/'
    click_link 'Galaxies'
    assert page.has_content?('Elliptical Galaxies')
    assert page.has_content?('Spiral Galaxies')
    assert page.has_content?('Lenticular Galaxies')
  end
 
  test "selecting a subtab" do
    visit '/'
    click_link 'Galaxies'
    assert page.has_content?('Listing elliptical_galaxies')
    click_link 'Spiral Galaxies'
    assert page.has_content?('Listing spiral_galaxies')
    click_link 'Lenticular Galaxies'
    assert page.has_content?('Listing lenticular_galaxies')
  end
 
  test "tab visibility" do
    visit '/'
    assert_tab_not_present 'Hidden'
    click_link 'Galaxies'
    assert_tab_present 'Hidden'
    click_link 'Planets'
    assert_tab_not_present 'Hidden'
  end
 
  test "subtab visibility" do
    visit '/'
    click_link 'Galaxies'
    click_link 'Hidden'
    assert_subtab_present 'Always Visible'
    assert_subtab_not_present 'Always Hidden'
  end
 
  test "changing tab text" do
    visit '/'
    click_link 'Stars'
    assert_tab_present 'Stars!'
    assert_tab_not_present 'Stars'
  end
 
  test "disabled tabs" do
    visit '/'
    assert_tab_disabled 'Disabled'
    click_link 'Stars'
    assert_tab_enabled 'Disabled'
  end
 
  test "disabled subtabs" do
    visit '/'
    click_link 'Stars'
    click_link 'Disabled'
    assert_subtab_enabled 'Always Enabled'
    assert_subtab_disabled 'Always Disabled'
  end
 
end

Version data entries

13 entries across 9 versions & 1 rubygems

Version Path
tabulous-1.3.0 test/applications/rails30/subtabs/test/integration/subtabs_test.rb
tabulous-1.3.0 test/applications/rails31/subtabs/test/integration/subtabs_test.rb
tabulous-1.2.0 test/applications/rails31/subtabs/test/integration/subtabs_test.rb
tabulous-1.2.0 test/applications/rails30/subtabs/test/integration/subtabs_test.rb
tabulous-1.1.0 test/applications/rails31/subtabs/test/integration/subtabs_test.rb
tabulous-1.1.0 test/applications/rails30/subtabs/test/integration/subtabs_test.rb
tabulous-1.0.3 test/applications/rails31/subtabs/test/integration/subtabs_test.rb
tabulous-1.0.3 test/applications/rails30/subtabs/test/integration/subtabs_test.rb
tabulous-1.0.2 test/applications/subtabs/test/integration/subtabs_test.rb
tabulous-1.0.1 test/applications/subtabs/test/integration/subtabs_test.rb
tabulous-1.0.0 test/applications/subtabs/test/integration/subtabs_test.rb
tabulous-0.0.2 test/applications/subtabs/test/integration/subtabs_test.rb
tabulous-0.0.1 test/applications/subtabs/test/integration/subtabs_test.rb