Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:paytonrules/selenium-on-rails
Conflicts: .gitignore test/selenium_on_rails_config_test.rb Huge number of changes, but mostly relating to testing. git-svn-id: https://svn.openqa.org/svn/selenium-on-rails/selenium-on-rails@126 9274398c-e119-0410-8437-aa71ef7847aa
- Loading branch information
Showing
18 changed files
with
171 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
<<<<<<< HEAD:.gitignore | ||
config.yml | ||
gems | ||
gems | ||
======= | ||
/config.yml | ||
test_data/html.html | ||
test_data/html.rsel | ||
test_data/html.sel | ||
coverage/* | ||
>>>>>>> 25e0918d65600c8c5fb76674368dbac4520434c4:.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Please read as our directions have changed: | ||
# Move this file to your rails apps config directory and rename it to selenium.yml in order to configure the plugin | ||
|
||
# | ||
# General settings | ||
# | ||
|
||
environments: | ||
- test | ||
# - development # Uncomment this line to enable in development environment. N.B. your development database will likely be altered/destroyed/abducted | ||
|
||
#selenium_path: 'c:\selenium' #path to selenium installation. only needed if you for some reason don't want to use the bundled version of selenium core | ||
|
||
# | ||
# rake test:acceptance settings | ||
# | ||
|
||
browsers: | ||
# Windows | ||
# firefox: 'c:\Program Files\Mozilla Firefox\firefox.exe' | ||
# ie: 'c:\Program Files\Internet Explorer\iexplore.exe' | ||
|
||
# Mac OS X | ||
firefox: '/Applications/Firefox.app/Contents/MacOS/firefox-bin' | ||
safari: '/Applications/Safari.app/Contents/MacOS/Safari' | ||
|
||
#host: 'localhost' | ||
#port_start: 3000 | ||
#port_end: 3005 | ||
#base_url_path: '/' | ||
#max_browser_duration: 120 | ||
#multi_window: false | ||
|
||
#result_dir: 'c:\result' # the directory where the results will be stored after a test:acceptance run | ||
|
||
#fixtures_path: <%= "#{RAILS_ROOT}/spec/fixtures" %> | ||
#selenium_tests_path: <%= "#{RAILS_ROOT}/spec/selenium" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
require File.dirname(__FILE__) + '/test_helper' | ||
require 'mocha' | ||
RAILS_ROOT = File.expand_path(File.dirname(__FILE__) + "/") | ||
|
||
class SeleniumOnRails::PathsTest < Test::Unit::TestCase | ||
|
||
include SeleniumOnRails::Paths | ||
|
||
def test_selenium_tests_path_when_config_has_not_selenium_tests_path | ||
SeleniumOnRailsConfig.expects(:get).with("selenium_tests_path").returns(nil) | ||
assert_equal "#{RAILS_ROOT}/test/selenium", selenium_tests_path | ||
end | ||
|
||
def test_selenium_tests_path_when_config_has_selenium_tests_path | ||
SeleniumOnRailsConfig.expects(:get).with("selenium_tests_path").returns("path").at_least_once | ||
assert_equal "path", selenium_tests_path | ||
end | ||
|
||
def test_fixtures_path_when_config_has_not_fixtures_path | ||
SeleniumOnRailsConfig.expects(:get).with("fixtures_path").returns(nil) | ||
assert_equal "#{RAILS_ROOT}/test/fixtures", fixtures_path | ||
end | ||
|
||
def test_fixtures_path_when_config_has_fixtures_path | ||
SeleniumOnRailsConfig.expects(:get).with("fixtures_path").returns("path").at_least_once | ||
assert_equal "path", fixtures_path | ||
end | ||
|
||
def test_view_path | ||
assert_equal File.expand_path("#{RAILS_ROOT}/../lib/views/my_view"), view_path('my_view') | ||
end | ||
|
||
def test_layout_path | ||
assert_equal "layout.rhtml", layout_path | ||
end | ||
|
||
def test_skip_file_when_file_contain_CVS | ||
assert skip_file?("file/with/CVS/in/the/middle/of/path") | ||
end | ||
|
||
def test_skip_file_when_file_contain_dot | ||
assert skip_file?("file/with/./(dot)/in/the/middle/of/path") | ||
end | ||
|
||
def test_skip_file_when_file_contain_underline | ||
assert skip_file?("file/with/_underline/in/the/middle/of/path") | ||
end | ||
|
||
def test_skip_file_when_file_contain_accent_mark | ||
assert skip_file?("file/with/mark~/in/the/middle/of/path") | ||
end | ||
|
||
def test_skip_file_when_file_does_not_have_any_reason_to_skip | ||
assert !skip_file?("my/valid/file") | ||
end | ||
|
||
def test_selenium_path | ||
assert_equal File.expand_path("#{RAILS_ROOT}/../selenium-core") + "/", selenium_path | ||
end | ||
|
||
def test_selenium_path_when_selenium_core_installation_is_not_found | ||
selenium_core_path = File.expand_path(File.dirname(__FILE__) + "/../selenium-core") | ||
|
||
File.expects(:exist?).with("#{selenium_core_path}/core/TestRunner.html").returns(false) | ||
File.expects(:exist?).with("#{selenium_core_path}/selenium/TestRunner.html").returns(false) | ||
File.expects(:exist?).with("#{selenium_core_path}/javascript/TestRunner.html").returns(false) | ||
File.expects(:exist?).with("#{selenium_core_path}/TestRunner.html").returns(false) | ||
@@selenium_path = nil | ||
assert_raise(RuntimeError) { selenium_path } | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.