gridium 1.0.26 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/builder +1 -1
- data/docker-compose.dev.yml +6 -0
- data/docker-compose.yml +7 -5
- data/gridium.gemspec +1 -1
- data/lib/driver.rb +1 -1
- data/lib/element.rb +16 -3
- data/lib/gridium/version.rb +1 -1
- data/lib/page.rb +1 -1
- data/lib/testrail.rb +12 -10
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32115dbdf2dd2771f65ef572841160955d84d31a
|
4
|
+
data.tar.gz: eec6da5442e752ce320978eded3d509f5d0d41a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f8f95300b4910e0a5d2ee2ff288f47bdaa25381c534abaf46e57eadd07b2a062e3b3eb200021611ac53d36450ed42a4a936d9437b957a7c7cf0ec478eaf0e5
|
7
|
+
data.tar.gz: e75adc2c2cb937c1928a0f8b2a4369451b678d4baca7e9011b993ace8f7a79daacd0fb1f4a6b80b5deb383ee4c3642be60596351680e0033f6e2a2c124aa3cbb
|
data/bin/builder
CHANGED
@@ -7,7 +7,7 @@ main() {
|
|
7
7
|
|
8
8
|
docker exec $(docker-compose ps -q gridium) bash -c "echo -e '---\n:rubygems_api_key: $1' >> ~/.gem/credentials; chmod 0600 ~/.gem/credentials; cat ~/.gem/credentials"
|
9
9
|
docker exec $(docker-compose ps -q gridium) bash -c "gem build gridium.gemspec"
|
10
|
-
docker exec $(docker-compose ps -q gridium) bash -c "gem push gridium-1.
|
10
|
+
docker exec $(docker-compose ps -q gridium) bash -c "gem push gridium-1.1.$BUILD_NUMBER.gem"
|
11
11
|
}
|
12
12
|
|
13
13
|
main $1
|
data/docker-compose.dev.yml
CHANGED
data/docker-compose.yml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
version: '2'
|
2
2
|
services:
|
3
3
|
hub:
|
4
|
-
image:
|
4
|
+
image: selenium/hub:3.1.0
|
5
5
|
ports:
|
6
6
|
- "4444"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
environment:
|
8
|
+
- GRID_BROWSER_TIMEOUT=30
|
9
|
+
chrome:
|
10
|
+
image: selenium/node-chrome-debug:3.1.0
|
11
11
|
depends_on:
|
12
12
|
- hub
|
13
13
|
environment:
|
@@ -15,6 +15,8 @@ services:
|
|
15
15
|
- HUB_PORT_4444_TCP_PORT=4444
|
16
16
|
- no_proxy=localhost
|
17
17
|
- HUB_ENV_no_proxy=localhost
|
18
|
+
ports:
|
19
|
+
- "5900"
|
18
20
|
mustadio:
|
19
21
|
image: yetanotherlucas/mustadio
|
20
22
|
ports:
|
data/gridium.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency "webmock", "~>2.3"
|
34
34
|
spec.add_development_dependency "dotenv", "~>2.1"
|
35
35
|
|
36
|
-
spec.add_runtime_dependency "selenium-webdriver", "
|
36
|
+
spec.add_runtime_dependency "selenium-webdriver", "3.3.0"
|
37
37
|
spec.add_runtime_dependency "oily_png", "~> 1.2"
|
38
38
|
spec.add_runtime_dependency 'aws-sdk', '~> 2'
|
39
39
|
end
|
data/lib/driver.rb
CHANGED
@@ -91,7 +91,7 @@ class Driver
|
|
91
91
|
Log.debug("[Gridium::Driver] Page loaded in (#{page_load}) seconds.")
|
92
92
|
$verification_passes += 1
|
93
93
|
end
|
94
|
-
rescue
|
94
|
+
rescue Exception => e
|
95
95
|
Log.debug("[Gridium::Driver] #{e.backtrace.inspect}")
|
96
96
|
Log.error("[Gridium::Driver] Timed out attempting to load #{path} for #{Gridium.config.page_load_timeout} seconds:\n#{e.message}\n - Also be sure to check the url formatting. http:// is required for proper test execution (www is optional).")
|
97
97
|
raise e
|
data/lib/element.rb
CHANGED
@@ -127,13 +127,26 @@ class Element
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def click
|
130
|
-
Log.debug("Clicking on #{self}")
|
130
|
+
Log.debug("[GRIDIUM::Element] Clicking on #{self}")
|
131
|
+
click_retry = 2
|
131
132
|
if element.enabled?
|
132
133
|
ElementExtensions.highlight(self) if Gridium.config.highlight_verifications
|
133
134
|
$verification_passes += 1
|
134
|
-
|
135
|
+
begin
|
136
|
+
element.click
|
137
|
+
rescue Exception => e
|
138
|
+
Log.warn("[GRIDIUM::Element] Click Exception retrying...")
|
139
|
+
sleep 0.15
|
140
|
+
click_retry -= 1
|
141
|
+
if click_retry >= 0
|
142
|
+
retry
|
143
|
+
else
|
144
|
+
Log.error("[GRIDIUM::Element] Click Exception #{e}")
|
145
|
+
fail
|
146
|
+
end
|
147
|
+
end
|
135
148
|
else
|
136
|
-
Log.error('Cannot click on element. Element is not present.')
|
149
|
+
Log.error('[GRIDIUM::Element] Cannot click on element. Element is not present.')
|
137
150
|
end
|
138
151
|
end
|
139
152
|
|
data/lib/gridium/version.rb
CHANGED
data/lib/page.rb
CHANGED
data/lib/testrail.rb
CHANGED
@@ -81,17 +81,19 @@ module Gridium
|
|
81
81
|
closed = false
|
82
82
|
if Gridium.config.testrail && !@run_info[:error]
|
83
83
|
Log.debug("[GRIDIUM::TestRail] Closing test runid: #{@run_info[:id]}\n")
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
r = _send_request('POST', "#{@url}add_results_for_cases/#{@run_info[:id]}", {results: @tc_results})
|
88
|
-
Log.debug("[GRIDIUM::TestRail] ADD RESULTS: #{r}")
|
89
|
-
sleep 0.25
|
90
|
-
Log.debug("#{r.class}")
|
91
|
-
if r.is_a?(Hash)
|
92
|
-
r = _send_request('POST', "#{@url}update_run/#{@run_info[:id]}", {:name => "ER:#{@run_info[:name]}", :description => "#{@run_info[:desc]}\nThe following was returned when adding cases: #{r}"})
|
93
|
-
Log.warn("[GRIDIUM::TestRail] ERROR: #{r}")
|
84
|
+
if @tc_ids.size > 0
|
85
|
+
r = _send_request('POST', "#{@url}update_run/#{@run_info[:id]}", {:case_ids => @tc_ids})
|
86
|
+
Log.debug("[GRIDIUM::TestRail] UPDATE RUN: #{r}")
|
94
87
|
sleep 0.25
|
88
|
+
r = _send_request('POST', "#{@url}add_results_for_cases/#{@run_info[:id]}", {results: @tc_results})
|
89
|
+
Log.debug("[GRIDIUM::TestRail] ADD RESULTS: #{r}")
|
90
|
+
sleep 0.25
|
91
|
+
Log.debug("#{r.class}")
|
92
|
+
if r.is_a?(Hash)
|
93
|
+
r = _send_request('POST', "#{@url}update_run/#{@run_info[:id]}", {:name => "ER:#{@run_info[:name]}", :description => "#{@run_info[:desc]}\nThe following was returned when adding cases: #{r}"})
|
94
|
+
Log.warn("[GRIDIUM::TestRail] ERROR: #{r}")
|
95
|
+
sleep 0.25
|
96
|
+
end
|
95
97
|
end
|
96
98
|
r = _send_request('POST', "#{@url}close_run/#{@run_info[:id]}", nil)
|
97
99
|
Log.debug("[GRIDIUM::TestRail] CLOSE RUN: #{r}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gridium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,22 +84,16 @@ dependencies:
|
|
84
84
|
name: selenium-webdriver
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
-
- - "<"
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '3'
|
89
|
+
version: 3.3.0
|
93
90
|
type: :runtime
|
94
91
|
prerelease: false
|
95
92
|
version_requirements: !ruby/object:Gem::Requirement
|
96
93
|
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: 2.50.0
|
100
|
-
- - "<"
|
94
|
+
- - '='
|
101
95
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
96
|
+
version: 3.3.0
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
98
|
name: oily_png
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|