watir 6.0.2 → 6.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c452d14d2ec0f55db84854a88fa81bf2631c8be0
4
- data.tar.gz: 212508555b65ff6e62c953e4b1a2d81827a86502
3
+ metadata.gz: b31273840de10dfe1602617e11a26791aeaa987c
4
+ data.tar.gz: 46d8f8dce7328f9c0a565b1192b76ff8a043c991
5
5
  SHA512:
6
- metadata.gz: 11db8f172a9752d82e1388972427b8b4a3857674f29ac78a36255c56465d9d3ff3f0b0d93c591941d38976ceb9f1cbc7ef18fba06006e331ce82208069cb96d8
7
- data.tar.gz: 72118e5609b15e570bc2c1c75a8fc68a84b29122da6faef9b81f58b605d970ff0ec6aa38403d96c6c4f4d7ed061be39d63359bb8fb2391d98184922dbfff0f2d
6
+ metadata.gz: 9ef6b109c77b683ec6a6cc9d8fd539bb87538c8ebe5eda2d5991ca34edd4600f187ed4df7b353c73e9916dbb030308039cdd09eddc0ea17953be4540708aa002
7
+ data.tar.gz: f806448ab1781831144860d84640e2f85739f05b25d58e6094125aeab51b332ea5b2e372edeb1e1ba0f4fcf4fa762cd1a9197150cf7897109d354570858582af
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 6.0.3 (2016-12-22)
2
+
3
+ * No notable changes, only includes fixes for WatirSpec
4
+
1
5
  ### 6.0.2 (2016-11-15)
2
6
 
3
7
  * Fix bug for `Timer#current_time` calling the wrong `Time`
@@ -13,6 +13,7 @@ module WatirSpec
13
13
  end
14
14
 
15
15
  def run!
16
+ load_support
16
17
  WatirSpec::Runner.execute_if_necessary
17
18
  end
18
19
 
@@ -28,6 +29,13 @@ module WatirSpec
28
29
  @unguarded ||= false
29
30
  end
30
31
 
32
+ def load_support
33
+ root = File.expand_path("../../spec/watirspec", __FILE__)
34
+ Dir.glob("#{root}/support/**/*.rb").each do |file|
35
+ require file
36
+ end
37
+ end
38
+
31
39
  def implementation
32
40
  @implementation ||= (
33
41
  imp = WatirSpec::Implementation.new
@@ -15,7 +15,7 @@ module WatirSpec
15
15
  print "\n\nWatirSpec guards for this implementation: "
16
16
 
17
17
  if gs.empty?
18
- puts "none."
18
+ puts "none."
19
19
  else
20
20
  puts
21
21
  gs.each do |guard|
@@ -48,7 +48,7 @@ module WatirSpec
48
48
  def bug(key, *impls)
49
49
  Guards.record :bug, impls, file: caller.first, key: key
50
50
  return yield if WatirSpec.unguarded?
51
- yield unless WatirSpec.implementation.matches_guard?(impls)
51
+ yield if impls.any? && !WatirSpec.implementation.matches_guard?(impls)
52
52
  end
53
53
  end
54
54
  end
@@ -24,7 +24,7 @@ module WatirSpec
24
24
 
25
25
  def matching_guards_in(guards)
26
26
  result = []
27
- guards.each { |args, data| data.each { |d| result << d } if matches_guard?(args) }
27
+ guards.each { |args, data| data.each { |d| result << d } if args.empty? || matches_guard?(args) }
28
28
 
29
29
  result
30
30
  end
@@ -26,34 +26,3 @@ end
26
26
  if Selenium::WebDriver::Platform.linux? && ENV['DISPLAY'].nil?
27
27
  raise "DISPLAY not set"
28
28
  end
29
-
30
- TIMING_EXCEPTIONS = { raise_unknown_object_exception: Watir::Exception::UnknownObjectException,
31
- raise_no_matching_window_exception: Watir::Exception::NoMatchingWindowFoundException,
32
- raise_unknown_frame_exception: Watir::Exception::UnknownFrameException,
33
- raise_object_disabled_exception: Watir::Exception::ObjectDisabledException,
34
- raise_object_read_only_exception: Watir::Exception::ObjectReadOnlyException}
35
-
36
- TIMING_EXCEPTIONS.each do |matcher, exception|
37
- RSpec::Matchers.define matcher do |_expected|
38
- match do |actual|
39
- original_timeout = Watir.default_timeout
40
- Watir.default_timeout = 0
41
- begin
42
- actual.call
43
- false
44
- rescue exception
45
- true
46
- ensure
47
- Watir.default_timeout = original_timeout
48
- end
49
- end
50
-
51
- failure_message do |actual|
52
- "expected #{exception} but nothing was raised"
53
- end
54
-
55
- def supports_block_expectations?
56
- true
57
- end
58
- end
59
- end
@@ -78,7 +78,7 @@ describe "Browser" do
78
78
  bug "Capitalization bug fixed in upcoming release", %i(remote firefox) do
79
79
  describe "#name" do
80
80
  it "returns browser name" do
81
- expect(browser.name).to eq WatirSpec.implementation.browser_args[1][:desired_capabilities].browser_name.to_sym
81
+ expect(browser.name).to eq(WatirSpec.implementation.browser_args.first)
82
82
  end
83
83
  end
84
84
  end
@@ -6,9 +6,11 @@ describe "Forms" do
6
6
  browser.goto(WatirSpec.url_for("forms_with_input_elements.html"))
7
7
  end
8
8
 
9
- describe "with selectors" do
10
- it "returns the matching elements" do
11
- expect(browser.forms(method: "post").to_a).to eq [browser.form(method: "post")]
9
+ bug "https://github.com/watir/watir/issues/507" do
10
+ describe "with selectors" do
11
+ it "returns the matching elements" do
12
+ expect(browser.forms(method: "post").to_a).to eq [browser.form(method: "post")]
13
+ end
12
14
  end
13
15
  end
14
16
 
@@ -0,0 +1,34 @@
1
+ if defined?(RSpec)
2
+ TIMING_EXCEPTIONS = {
3
+ raise_unknown_object_exception: Watir::Exception::UnknownObjectException,
4
+ raise_no_matching_window_exception: Watir::Exception::NoMatchingWindowFoundException,
5
+ raise_unknown_frame_exception: Watir::Exception::UnknownFrameException,
6
+ raise_object_disabled_exception: Watir::Exception::ObjectDisabledException,
7
+ raise_object_read_only_exception: Watir::Exception::ObjectReadOnlyException
8
+ }.freeze
9
+
10
+ TIMING_EXCEPTIONS.each do |matcher, exception|
11
+ RSpec::Matchers.define matcher do |_expected|
12
+ match do |actual|
13
+ original_timeout = Watir.default_timeout
14
+ Watir.default_timeout = 0
15
+ begin
16
+ actual.call
17
+ false
18
+ rescue exception
19
+ true
20
+ ensure
21
+ Watir.default_timeout = original_timeout
22
+ end
23
+ end
24
+
25
+ failure_message do |_actual|
26
+ "expected #{exception} but nothing was raised"
27
+ end
28
+
29
+ def supports_block_expectations?
30
+ true
31
+ end
32
+ end
33
+ end
34
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'watir'
5
- s.version = '6.0.2'
5
+ s.version = '6.0.3'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ['Alex Rodionov', 'Titus Fortner']
8
8
  s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-15 00:00:00.000000000 Z
12
+ date: 2016-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver
@@ -291,7 +291,6 @@ files:
291
291
  - spec/locator_spec_helper.rb
292
292
  - spec/spec_helper.rb
293
293
  - spec/special_chars_spec.rb
294
- - spec/watirspec/.gitignore
295
294
  - spec/watirspec/after_hooks_spec.rb
296
295
  - spec/watirspec/alert_spec.rb
297
296
  - spec/watirspec/browser_spec.rb
@@ -437,6 +436,7 @@ files:
437
436
  - spec/watirspec/html/window_switching.html
438
437
  - spec/watirspec/relaxed_locate_spec.rb
439
438
  - spec/watirspec/screenshot_spec.rb
439
+ - spec/watirspec/support/raise_exception_matchers.rb
440
440
  - spec/watirspec/wait_spec.rb
441
441
  - spec/watirspec/window_switching_spec.rb
442
442
  - spec/watirspec_helper.rb
@@ -465,7 +465,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
465
465
  version: '0'
466
466
  requirements: []
467
467
  rubyforge_project: watir
468
- rubygems_version: 2.4.8
468
+ rubygems_version: 2.5.2
469
469
  signing_key:
470
470
  specification_version: 4
471
471
  summary: Watir powered by Selenium
@@ -480,7 +480,6 @@ test_files:
480
480
  - spec/locator_spec_helper.rb
481
481
  - spec/spec_helper.rb
482
482
  - spec/special_chars_spec.rb
483
- - spec/watirspec/.gitignore
484
483
  - spec/watirspec/after_hooks_spec.rb
485
484
  - spec/watirspec/alert_spec.rb
486
485
  - spec/watirspec/browser_spec.rb
@@ -626,6 +625,7 @@ test_files:
626
625
  - spec/watirspec/html/window_switching.html
627
626
  - spec/watirspec/relaxed_locate_spec.rb
628
627
  - spec/watirspec/screenshot_spec.rb
628
+ - spec/watirspec/support/raise_exception_matchers.rb
629
629
  - spec/watirspec/wait_spec.rb
630
630
  - spec/watirspec/window_switching_spec.rb
631
631
  - spec/watirspec_helper.rb
@@ -1,2 +0,0 @@
1
- *.rbc
2
- .idea