scoutui 2.0.3.8.pre → 2.0.3.9.pre
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.
- checksums.yaml +4 -4
- data/lib/scoutui/appmodel/q_model.rb +4 -1
- data/lib/scoutui/base/q_browser.rb +3 -1
- data/lib/scoutui/base/user_vars.rb +6 -0
- data/lib/scoutui/base/visual_test_framework.rb +25 -1
- data/lib/scoutui/commands/click_object.rb +2 -0
- data/lib/scoutui/commands/strategy.rb +1 -0
- data/lib/scoutui/commands/type.rb +0 -6
- data/lib/scoutui/eyes/eye_scout.rb +17 -3
- data/lib/scoutui/utils/utils.rb +7 -1
- data/lib/scoutui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85f74f61ddde9a9f3780649cf4cb0a62025b50fb
|
4
|
+
data.tar.gz: e2c3e2c54903c23c6ce96052ed1557836f63e4a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 323b77c4659a4bd93744b57af6d20a7ef14288e2f373aaab2ff90d351e570648e59578478d9c5be44214eab20168dbf8984cf05e6c3d437d56b34177c042a3ef
|
7
|
+
data.tar.gz: 0edc3b3ded7801b002d2d0c176e1eba8d3cf12f8737b0160f4faf5ee2a9b94668c29bfcae447950515a8be22885522cd77473f20dc0ca453a14561af454e3ba5
|
@@ -50,7 +50,8 @@ module Scoutui::ApplicationModel
|
|
50
50
|
def getPageElement(s)
|
51
51
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getPageElement(#{s})"
|
52
52
|
|
53
|
-
if s.match(/^\s*\//) || s.match(/^\s*css\s*=/i)
|
53
|
+
if s.match(/^\s*\//) || s.match(/^\s*css\s*=/i) || s.match(/^\s*#/)
|
54
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getPageElement(#{s} return nil"
|
54
55
|
return nil
|
55
56
|
end
|
56
57
|
|
@@ -59,6 +60,8 @@ module Scoutui::ApplicationModel
|
|
59
60
|
nodes = s.split(/\./)
|
60
61
|
|
61
62
|
nodes.each { |elt|
|
63
|
+
|
64
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " process #{elt}"
|
62
65
|
getter = elt.split(/\(/)[0]
|
63
66
|
_obj = elt.match(/\((.*)\)/)[1]
|
64
67
|
|
@@ -173,7 +173,9 @@ module Scoutui::Base
|
|
173
173
|
if !frames.nil?
|
174
174
|
puts __FILE__ + (__LINE__).to_s + " [self.switch_frame]: frames => #{frames}";
|
175
175
|
|
176
|
-
|
176
|
+
# frame_list=frames.split(/(frame\(.*\))\.(?=[\w])/)
|
177
|
+
frame_list=frames.split(/\.(?=frame)/)
|
178
|
+
|
177
179
|
|
178
180
|
frame_list.each do |_f|
|
179
181
|
puts __FILE__ + (__LINE__).to_s + " processing #{_f}"
|
@@ -385,7 +385,31 @@ module Scoutui::Base
|
|
385
385
|
|
386
386
|
if _v.has_key?('visible_when')
|
387
387
|
|
388
|
-
if _v['visible_when'].match(/
|
388
|
+
if _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)
|
389
|
+
|
390
|
+
user_var = _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)[1]
|
391
|
+
expected_v = _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)[2]
|
392
|
+
|
393
|
+
_uservar_val = Scoutui::Base::UserVars.instance.getVar(user_var)
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
puts __FILE__ + (__LINE__).to_s + " _uservar_val : #{_uservar_val}"
|
398
|
+
puts __FILE__ + (__LINE__).to_s + " Assert user variable - #{user_var} matches #{expected_v} => #{_uservar_val.match(expected_v)}"
|
399
|
+
|
400
|
+
|
401
|
+
if _uservar_val.match(expected_v)
|
402
|
+
# 5150
|
403
|
+
|
404
|
+
Scoutui::Logger::LogMgr.instance.asserts.info __FILE__ + (__LINE__).to_s + "Verify conditional assertion #{_k} - #{!_obj.nil?}"
|
405
|
+
Testmgr::TestReport.instance.getReq(_req).get_child('visible_when').add(!_obj.nil?, "Verify assertion #{_k} - #{_locator} visible when #{_v['visible_when']}")
|
406
|
+
else
|
407
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Conditional Assertion skipped - trigger #{_v['visible_when']} is false"
|
408
|
+
end
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
elsif _v['visible_when'].match(/always/i)
|
389
413
|
Scoutui::Logger::LogMgr.instance.asserts.info __FILE__ + (__LINE__).to_s + " Verify assertion #{_k} - #{_locator} visible - #{!_obj.nil?.to_s}"
|
390
414
|
Testmgr::TestReport.instance.getReq(_req).get_child('visible_when').add(!_obj.nil?, "Verify assertion #{_k} - #{_locator} visible")
|
391
415
|
elsif Scoutui::Base::Assertions.instance.visible_when_never(_k, _v, _obj, _req)
|
@@ -160,6 +160,7 @@ module Scoutui::Commands
|
|
160
160
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Ruby bindings workaround for Edge"
|
161
161
|
caps={}
|
162
162
|
else
|
163
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " edge()"
|
163
164
|
caps = Selenium::WebDriver::Remote::Capabilities.edge()
|
164
165
|
end
|
165
166
|
|
@@ -48,11 +48,6 @@ module Scoutui::Commands
|
|
48
48
|
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
49
49
|
|
50
50
|
begin
|
51
|
-
# _xpath = @cmd.match(/type[\!]*\((.*),\s*/)[1].to_s
|
52
|
-
# _val = @cmd.match(/type[\!]*\(.*,\s*(.*)\)/)[1].to_s
|
53
|
-
|
54
|
-
|
55
|
-
|
56
51
|
|
57
52
|
if @cmd.strip.match(/^\s*type\s*\(\s*__TAB__\s*\)\s*$/)
|
58
53
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " HIT TAB key"
|
@@ -68,7 +63,6 @@ module Scoutui::Commands
|
|
68
63
|
|
69
64
|
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + "Process TYPE #{_val} into #{_xpath}"
|
70
65
|
|
71
|
-
# 5150 obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath, Scoutui::Commands::Utils.instance.getTimeout)
|
72
66
|
obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
|
73
67
|
|
74
68
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " type(#{_val})"
|
@@ -143,15 +143,28 @@ module Scoutui::Eyes
|
|
143
143
|
end
|
144
144
|
|
145
145
|
def check_window(tag, region=nil)
|
146
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s})" if Scoutui::Utils::TestUtils.instance.isDebug?
|
146
|
+
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s}, #{region})" if Scoutui::Utils::TestUtils.instance.isDebug?
|
147
147
|
|
148
148
|
return if !Scoutui::Utils::TestUtils.instance.eyesEnabled?
|
149
149
|
|
150
150
|
if region.nil?
|
151
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s})"
|
151
152
|
eyes().check_window(tag.to_s)
|
152
153
|
else
|
154
|
+
|
155
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " check_window.fullshot"
|
153
156
|
f = eyes().force_fullpage_screenshot
|
154
|
-
|
157
|
+
|
158
|
+
if region.match(/^css\s*\=\s*/)
|
159
|
+
_css = region.gsub(/^css\s*\=\s*/,"").to_s
|
160
|
+
|
161
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " snapshot(region.css) : #{_css}"
|
162
|
+
eyes().check_region(:css, _css, tag)
|
163
|
+
else
|
164
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "check_window(:xpath, #{region}, #{tag})"
|
165
|
+
eyes().check_region(:xpath, region, tag)
|
166
|
+
end
|
167
|
+
|
155
168
|
eyes().force_fullpage_screenshot = f
|
156
169
|
end
|
157
170
|
|
@@ -193,6 +206,7 @@ module Scoutui::Eyes
|
|
193
206
|
viewport_size = Scoutui::Base::UserVars.instance.getViewPort()
|
194
207
|
|
195
208
|
puts __FILE__ + (__LINE__).to_s + " browserType => #{browserType}"
|
209
|
+
puts __FILE__ + (__LINE__).to_s + " viewport : #{viewport_size}"
|
196
210
|
|
197
211
|
|
198
212
|
Testmgr::TestReport.instance.setDescription('ScoutUI Test')
|
@@ -238,7 +252,7 @@ module Scoutui::Eyes
|
|
238
252
|
end
|
239
253
|
|
240
254
|
rescue => ex
|
241
|
-
Scoutui::Logger::LogMgr.instance.
|
255
|
+
Scoutui::Logger::LogMgr.instance.warn ex.backtrace
|
242
256
|
end
|
243
257
|
|
244
258
|
end
|
data/lib/scoutui/utils/utils.rb
CHANGED
data/lib/scoutui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoutui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.3.
|
4
|
+
version: 2.0.3.9.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Kim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|