Sha256: f43388f35eb6ab7289df87a46a52cf0a4b89120bd4a9d22b28c1747904c6c679

Contents?: true

Size: 1.23 KB

Versions: 11

Compression:

Stored size: 1.23 KB

Contents

# feature tests for white space

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
require 'unittests/setup'

class TC_WhiteSpace < Test::Unit::TestCase
  location __FILE__

  def setup
    uses_page "whitespace.html"
  end 

  tag_method :test_text_with_nbsp, :fails_on_ie
  def test_text_with_nbsp
    assert_equal 'Login', browser.link(:index => 1).text
  end

  tag_method :test_text_with_nbsp_ie, :fails_on_firefox
  def test_text_with_nbsp_ie
    assert_equal 'Login', browser.link(:index => 0).text
  end

  def test_nbsp_beginning_and_end
    assert browser.link(:text, 'Login').exists?
  end
  
  def test_single_nbsp
    assert_equal "Test for nbsp.", browser.span(:id, 'single_nbsp').text
  end
  
  def test_multiple_spaces
    assert_equal "Test for multiple spaces.", browser.span(:id, 'multiple_spaces').text
  end
  
  def test_multiple_spaces_access
    assert_equal 'multiple_spaces', browser.span(:text, "Test for multiple spaces.").id
  end
  
  def test_space_tab
    assert_equal "Test for space and tab.", browser.span(:id, 'space_tab').text
  end
  
  def test_space_w_cr
    assert_equal "Test for space and cr.", browser.span(:id, 'space_w_cr').text
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
commonwatir-3.0.0.rc3 unittests/whitespace_test.rb
commonwatir-3.0.0.rc2 unittests/whitespace_test.rb
commonwatir-3.0.0.rc1 unittests/whitespace_test.rb
commonwatir-2.0.4 unittests/whitespace_test.rb
commonwatir-2.0.3 unittests/whitespace_test.rb
commonwatir-2.0.2 unittests/whitespace_test.rb
commonwatir-2.0.2.rc1 unittests/whitespace_test.rb
commonwatir-2.0.1 unittests/whitespace_test.rb
commonwatir-2.0.0 unittests/whitespace_test.rb
commonwatir-2.0.0.rc3 unittests/whitespace_test.rb
commonwatir-2.0.0.rc2 unittests/whitespace_test.rb