superbara 0.14.0 → 0.14.1

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
  SHA256:
3
- metadata.gz: 690e9d764e02ee4728756ef0e24432270fb639c455df4080088dad40a763c05e
4
- data.tar.gz: acb593b91129cdd4a5fd9de9b34ba542c021a592f0aa67db05f71d5a54316d65
3
+ metadata.gz: 0a02b6bfd273cbffc96fd81528dd4ebe9e6641a7c14d33705134f7db8e206fac
4
+ data.tar.gz: ea42018036a97edc853c6ddfacaef08f78a62cd22647819725bbc4db532c2a86
5
5
  SHA512:
6
- metadata.gz: 3912747af73e55766a70dc08d5c0eddf10998bc250d3dbf56d80dd2a7c24b253dfacad86c12c0e0c53ab09739b6493bbe6e25cb58a2f46911c96e838e10932f6
7
- data.tar.gz: 504b8332fdc6d54acc72388dd2aaeaa104d7f454ab893a87365e44f4543e7b68be648ba9c011ce5ff0647765187502d916b9d966181e32ef559b1a9eb4d4daab
6
+ metadata.gz: 584b61e65fdb59e708633f8599ef2574958f7d1a7c20f0882fe0a0aec215f11f9a3d0268f7d45595c60d65617435a7a446c0481c2ff757fa8c9d2960523407d2
7
+ data.tar.gz: 6dbc0ba71ddb58e435dcddcc3a14764a6391b301344f2c906fce06bc2a013c319238261585229342981d2eeffad77f8e9f17c7774b6f1ee5ed18ea4d414ef146
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbara (0.14.0)
4
+ superbara (0.14.1)
5
5
  astrolabe (~> 1.3, >= 1.3.1)
6
6
  binding_of_caller (~> 0.8, >= 0.8.0)
7
7
  capybara (~> 3.1, >= 3.1.0)
@@ -169,7 +169,11 @@ module Superbara
169
169
  puts ""
170
170
  print "Error: ".colorize(:red)
171
171
  puts ex.message.split(" for #<Superbara::Context").first
172
- puts " in #{ex.backtrace_locations.first.path}:#{ex.backtrace_locations.first.lineno}"
172
+ if ex.backtrace_locations
173
+ puts " in #{ex.backtrace_locations.first.path}:#{ex.backtrace_locations.first.lineno}"
174
+ else
175
+ # for example <Selenium::WebDriver::Error::StaleElementReferenceError>
176
+ end
173
177
  end
174
178
 
175
179
  def self.print_tag_skip(ex)
@@ -61,6 +61,22 @@ module Superbara; module DSL
61
61
  value
62
62
  end
63
63
 
64
+ def all(*args)
65
+ elements = super *args
66
+ if elements && Superbara.visual?
67
+ for elem in elements[0..4]
68
+ elem.show styles: [{
69
+ "border" => "10px dashed Red"
70
+ }]
71
+ end
72
+
73
+ if elements.size > 5
74
+ Superbara.toast "and #{elements.size-5} more"
75
+ end
76
+ end
77
+ elements
78
+ end
79
+
64
80
  def find_text(text)
65
81
  text.downcase!
66
82
 
@@ -77,6 +93,7 @@ return Array.from(
77
93
  end
78
94
 
79
95
  def click_text(text)
96
+ Superbara.output "clicking text '#{text}'"
80
97
  find_text(text)&.click
81
98
  end
82
99
 
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.14.0"
2
+ VERSION = "0.14.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula