seleniumrc_fc_webrat_mapper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -2,16 +2,38 @@
2
2
 
3
3
  For simplifying migrating of Seleniumrc_fu Rails plugin tests to Webrat tests without an extensive rewrite.
4
4
 
5
- Extends Webrat::Methods and Webrat::Matchers modules to map Seleniumrc_fu methods to their Webrat equivalent.
5
+ Extends Webrat modules to map various Seleniumrc_fu API methods to their Webrat equivalent.
6
6
 
7
7
  Not a complete set of mappings, but can be easily extended.
8
8
 
9
- == Installation
9
+ == Usage
10
10
 
11
11
  Require 'seleniumrc_fu_webrat_mapper' after 'webrat'.
12
12
 
13
- require 'webrat'
14
- require 'seleniumrc_fu_webrat_mapper'
13
+ Update your seleniumrc_fu tests to use Webrat and the mapper will enable you to use (some of) the seleniumrc_fu API without rewriting to the Webrat API.
14
+
15
+ Simplified example:
16
+
17
+ require File.dirname(__FILE__) + "/../test_helper"
18
+ require "webrat"
19
+ require "seleniumrc_fu_webrat_mapper"
20
+
21
+ Webrat.configure do |config|
22
+ config.mode = :selenium
23
+ end
24
+
25
+ class SampleTest < ActionController::IntegrationTest
26
+
27
+ def test_user_can_login
28
+ open "/login"
29
+ assert_text_present 'Please login'
30
+ type "email", "joe@example.com"
31
+ type "password", "my_password"
32
+ click_and_wait "Login"
33
+ assert_text '//div[@id="flash_notice"]', 'Welcome back Joe!'
34
+ end
35
+
36
+ end
15
37
 
16
38
 
17
39
  Copyright (c) 2009 Niall Mullally, released under the MIT license
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -6,9 +6,12 @@ module Webrat
6
6
 
7
7
  def click_and_wait(text_or_title_or_id, options = {})
8
8
  click_link(text_or_title_or_id.clean_selector, options)
9
+ selenium.wait_for_page_to_load if Webrat.configuration.mode == :selenium
9
10
  end
10
11
 
11
- alias :click :click_and_wait
12
+ def click(text_or_title_or_id, options = {})
13
+ click_link(text_or_title_or_id.clean_selector, options)
14
+ end
12
15
 
13
16
  def type(field_locator, value)
14
17
  fill_in(field_locator.clean_selector, :with => value)
@@ -0,0 +1,60 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{seleniumrc_fc_webrat_mapper}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Niall Mullally"]
12
+ s.date = %q{2009-12-15}
13
+ s.email = %q{niall@4l.ie}
14
+ s.extra_rdoc_files = [
15
+ "README.rdoc"
16
+ ]
17
+ s.files = [
18
+ "MIT-LICENSE",
19
+ "README.rdoc",
20
+ "Rakefile",
21
+ "VERSION",
22
+ "install.rb",
23
+ "lib/seleniumrc_fu_webrat_mapper.rb",
24
+ "lib/seleniumrc_fu_webrat_mapper/core_extensions/string.rb",
25
+ "lib/seleniumrc_fu_webrat_mapper/matchers.rb",
26
+ "lib/seleniumrc_fu_webrat_mapper/methods.rb",
27
+ "lib/seleniumrc_fu_webrat_mapper/selenium/matchers.rb",
28
+ "lib/seleniumrc_fu_webrat_mapper/shared_matchers.rb",
29
+ "seleniumrc_fc_webrat_mapper-0.1.0.gem",
30
+ "seleniumrc_fc_webrat_mapper.gemspec",
31
+ "test/matchers_test.rb",
32
+ "test/methods_test.rb",
33
+ "test/selenium_matchers_test.rb",
34
+ "test/string_test.rb",
35
+ "test/test_helper.rb"
36
+ ]
37
+ s.homepage = %q{http://github.com/Sidane/seleniumrc_fu_webrat_mapper}
38
+ s.rdoc_options = ["--charset=UTF-8"]
39
+ s.require_paths = ["lib"]
40
+ s.rubygems_version = %q{1.3.5}
41
+ s.summary = %q{For simplifying migrating of Seleniumrc_fu Rails plugin tests to Webrat tests}
42
+ s.test_files = [
43
+ "test/matchers_test.rb",
44
+ "test/methods_test.rb",
45
+ "test/selenium_matchers_test.rb",
46
+ "test/string_test.rb",
47
+ "test/test_helper.rb"
48
+ ]
49
+
50
+ if s.respond_to? :specification_version then
51
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
+ s.specification_version = 3
53
+
54
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
+ else
56
+ end
57
+ else
58
+ end
59
+ end
60
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seleniumrc_fc_webrat_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niall Mullally
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-14 00:00:00 +00:00
12
+ date: 2009-12-15 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -33,6 +33,8 @@ files:
33
33
  - lib/seleniumrc_fu_webrat_mapper/methods.rb
34
34
  - lib/seleniumrc_fu_webrat_mapper/selenium/matchers.rb
35
35
  - lib/seleniumrc_fu_webrat_mapper/shared_matchers.rb
36
+ - seleniumrc_fc_webrat_mapper-0.1.0.gem
37
+ - seleniumrc_fc_webrat_mapper.gemspec
36
38
  - test/matchers_test.rb
37
39
  - test/methods_test.rb
38
40
  - test/selenium_matchers_test.rb