rwebspec 3.1.4 → 4.0

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/MIT-LICENSE CHANGED
File without changes
data/README CHANGED
File without changes
data/Rakefile CHANGED
@@ -1,100 +1,109 @@
1
- require 'rubygems'
2
- require 'rspec/core/rake_task'
3
- require 'rake/rdoctask'
4
- require 'rake/gempackagetask'
5
- require 'rdoc' # require rdoc 2
6
- gem 'darkfish-rdoc'
7
- # require 'darkfish-rdoc'
8
-
9
- $:.unshift(File.dirname(__FILE__) + "/lib")
10
- #require 'rwebspec'
11
-
12
- desc "Default task"
13
- task :default => [ :clean, :spec, :rdoc, :chm, :gem]
14
-
15
- desc "Continous build"
16
- task :build => [:clean, :spec]
17
-
18
- desc "Clean generated files"
19
- task :clean do
20
- rm_rf 'pkg'
21
- rm_rf 'doc'
22
- rm_rf 'chm'
23
- end
24
-
25
- desc 'Run all specs'
26
- RSpec::Core::RakeTask.new('spec') do |t|
27
- t.spec_opts = ['--format', 'specdoc', '--colour']
28
- # t.libs = ["lib", "server/lib" ]
29
- t.pattern = Dir['spec/**/*_spec.rb'].sort
30
- end
31
-
32
- # Generate the RDoc documentation
33
- # Rake::RDocTask.new { |rdoc|
34
- # rdoc.rdoc_dir = 'doc'
35
- # rdoc.title = 'rWebUnit'
36
- # rdoc.template = "#{ENV['template']}.rb" if ENV['template']
37
- # rdoc.rdoc_files.include('README')
38
- # rdoc.rdoc_files.include('lib/rwebspec.rb')
39
- # rdoc.rdoc_files.include('lib/rwebspec/*.rb')
40
- # }
41
-
42
- # using DarkFish - http://deveiate.org/projects/Darkfish-Rdoc/
43
- Rake::RDocTask.new do |rdoc|
44
- rdoc.rdoc_dir = 'doc'
45
- rdoc.title = 'RWebSpec'
46
- rdoc.rdoc_files.include('lib/rwebspec.rb')
47
- rdoc.rdoc_files.include('lib/rwebspec/*.rb')
48
- rdoc.rdoc_files.include('lib/extensions/*.rb')
49
- rdoc.rdoc_files.delete("lib/rwebspec/web_testcase.rb")
50
- rdoc.rdoc_files.delete("lib/rwebspec/checkJSDialog.rb")
51
- rdoc.options += [
52
- '-SHN',
53
- '-f', 'darkfish', # This is the important bit
54
- ]
55
- end
56
-
57
- Rake::RDocTask.new("chm") do |rdoc|
58
- rdoc.rdoc_dir = 'chm'
59
- rdoc.title = 'RWebSpec'
60
- rdoc.rdoc_files.include('lib/rwebspec.rb')
61
- rdoc.rdoc_files.include('lib/rwebspec/*.rb')
62
- rdoc.rdoc_files.delete("lib/rwebspec/web_testcase.rb")
63
- rdoc.rdoc_files.delete("lib/rwebspec/checkJSDialog.rb")
64
- rdoc.options += [
65
- '-SHN',
66
- '-f', 'chm', # This is the important bit
67
- ]
68
- end
69
-
70
-
71
- spec = Gem::Specification.new do |s|
72
- s.platform= Gem::Platform::RUBY
73
- s.name = "rwebspec"
74
- s.version = "3.1.4"
75
- s.summary = "Web application functional specification in Ruby"
76
- s.description = "Executable functional specification for web applications in RSpec syntax and Watir"
77
-
78
- s.author = "Zhimin Zhan"
79
- s.email = "zhimin@agileway.com.au"
80
- s.homepage= "http://github.com/zhimin/rwebspec/tree/master"
81
- s.rubyforge_project = "rwebspec"
82
-
83
- s.has_rdoc = true
84
- s.requirements << 'none'
85
- s.require_path = "lib"
86
- s.autorequire = "rwebspec"
87
-
88
- s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
89
- s.files = s.files + Dir.glob( "lib/**/*" )
90
- s.files = s.files + Dir.glob( "test/**/*" )
91
- s.files = s.files + Dir.glob( "sample/**/*")
92
- s.files = s.files + Dir.glob( "docs/**/*" )
93
- s.add_dependency(%q<rspec>, [">= 2.10"])
94
- s.add_dependency(%q<rspec-core>, [">= 2.10.1"])
95
- s.add_dependency("commonwatir", ">= 3.0")
96
- end
97
-
98
- Rake::GemPackageTask.new(spec) do |pkg|
99
- pkg.need_zip = true
100
- end
1
+ require 'rubygems'
2
+ require 'rspec/core/rake_task'
3
+ # require 'rake/rdoctask'
4
+ require 'rake/gempackagetask'
5
+ require 'rdoc' # require rdoc 2
6
+ # gem 'darkfish-rdoc'
7
+ # require 'darkfish-rdoc'
8
+
9
+ $:.unshift(File.dirname(__FILE__) + "/lib")
10
+ #require 'rwebspec'
11
+
12
+ desc "Default task"
13
+ task :default => [ :clean, :spec, :rdoc, :chm, :gem]
14
+
15
+ desc "Continous build"
16
+ task :build => [:clean, :spec]
17
+
18
+ desc "Clean generated files"
19
+ task :clean do
20
+ rm_rf 'pkg'
21
+ rm_rf 'doc'
22
+ rm_rf 'chm'
23
+ end
24
+
25
+ desc 'Run all specs'
26
+ RSpec::Core::RakeTask.new('spec') do |t|
27
+ t.rspec_opts = ['--format', 'specdoc', '--colour']
28
+ # t.libs = ["lib", "server/lib" ]
29
+ t.pattern = Dir['spec/**/*_spec.rb'].sort
30
+ end
31
+
32
+ # Generate the RDoc documentation
33
+ # Rake::RDocTask.new { |rdoc|
34
+ # rdoc.rdoc_dir = 'doc'
35
+ # rdoc.title = 'rWebUnit'
36
+ # rdoc.template = "#{ENV['template']}.rb" if ENV['template']
37
+ # rdoc.rdoc_files.include('README')
38
+ # rdoc.rdoc_files.include('lib/rwebspec.rb')
39
+ # rdoc.rdoc_files.include('lib/rwebspec/*.rb')
40
+ # }
41
+
42
+ =begin
43
+ # using DarkFish - http://deveiate.org/projects/Darkfish-Rdoc/
44
+ Rake::RDocTask.new do |rdoc|
45
+ rdoc.rdoc_dir = 'doc'
46
+ rdoc.title = 'RWebSpec'
47
+ rdoc.rdoc_files.include('lib/rwebspec.rb')
48
+ rdoc.rdoc_files.include('lib/rwebspec-common/*.rb')
49
+ rdoc.rdoc_files.include('lib/rwebspec-watir/*.rb')
50
+ rdoc.rdoc_files.include('lib/rwebspec-selenium/*.rb')
51
+ rdoc.rdoc_files.include('lib/extensions/*.rb')
52
+ rdoc.rdoc_files.delete("lib/rwebspec/web_testcase.rb")
53
+ rdoc.rdoc_files.delete("lib/rwebspec/checkJSDialog.rb")
54
+ rdoc.options += [
55
+ '-SHN',
56
+ '-f', 'darkfish', # This is the important bit
57
+ ]
58
+ end
59
+
60
+ Rake::RDocTask.new("chm") do |rdoc|
61
+ rdoc.rdoc_dir = 'chm'
62
+ rdoc.title = 'RWebSpec'
63
+ rdoc.rdoc_files.include('lib/rwebspec.rb')
64
+ rdoc.rdoc_files.include('lib/rwebspec-common/*.rb')
65
+ rdoc.rdoc_files.include('lib/rwebspec-watir/*.rb')
66
+ rdoc.rdoc_files.include('lib/rwebspec-selenium/*.rb')
67
+ rdoc.rdoc_files.delete("lib/rwebspec/web_testcase.rb")
68
+ rdoc.rdoc_files.delete("lib/rwebspec/checkJSDialog.rb")
69
+ rdoc.options += [
70
+ '-SHN',
71
+ '-f', 'chm', # This is the important bit
72
+ ]
73
+ end
74
+
75
+ =end
76
+
77
+ spec = Gem::Specification.new do |s|
78
+ s.platform= Gem::Platform::RUBY
79
+ s.name = "rwebspec"
80
+ s.version = "4.0"
81
+ s.summary = "Web application functional specification in Ruby"
82
+ s.description = "Executable functional specification for web applications in RSpec syntax with Watir or Selenium"
83
+
84
+ s.author = "Zhimin Zhan"
85
+ s.email = "zhimin@agileway.com.au"
86
+ s.homepage= "http://github.com/zhimin/rwebspec/tree/master"
87
+ s.rubyforge_project = "rwebspec"
88
+
89
+ s.has_rdoc = true
90
+ s.requirements << 'none'
91
+ s.require_path = "lib"
92
+ s.autorequire = "rwebspec"
93
+
94
+ s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
95
+ s.files = s.files + Dir.glob( "lib/**/*" )
96
+ s.files = s.files + Dir.glob( "test/**/*" )
97
+ s.files = s.files + Dir.glob( "sample/**/*")
98
+ s.files = s.files + Dir.glob( "docs/**/*" )
99
+ s.add_dependency(%q<rspec>, [">= 2.10"])
100
+ s.add_dependency(%q<rspec-core>, [">= 2.10.1"])
101
+ s.add_dependency("commonwatir", ">= 3.0")
102
+ if RUBY_PLATFORM =~ /mingw/
103
+ s.add_dependency("selenium-webdriver")
104
+ end
105
+ end
106
+
107
+ Rake::GemPackageTask.new(spec) do |pkg|
108
+ pkg.need_zip = true
109
+ end
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class Element
4
+ def exists?
5
+ self.displayed?
6
+ end
7
+ end
8
+ end
9
+ end
File without changes
@@ -40,6 +40,22 @@ module RWebSpec
40
40
  end
41
41
  end
42
42
 
43
+ def check_for_pause
44
+
45
+ if $TESTWISE_READY_TO_PAUSE
46
+ # Already executed the the line immedately above,
47
+ # give some buffer time for TW to set $TESTWISE_PAUSE flag
48
+ sleep 0.5
49
+ end
50
+
51
+ # If the executed line no change, ignore
52
+ while $TESTWISE_PAUSE
53
+ Thread.pass
54
+ debug("[selenium_webdriver_extension] Paused, waiting ...")
55
+ sleep 1
56
+ end
57
+ end
58
+
43
59
  def notify_screenshot_location(image_file_path)
44
60
  connect_to_testwise(" SHOT", image_file_path)
45
61
  end