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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c1e455704eb16cbaa41dc2b5c57292be5df9366
4
- data.tar.gz: 9dd5f0f17283d420d28b33daee281e2bbafe6ae5
3
+ metadata.gz: 32115dbdf2dd2771f65ef572841160955d84d31a
4
+ data.tar.gz: eec6da5442e752ce320978eded3d509f5d0d41a5
5
5
  SHA512:
6
- metadata.gz: ee7d951178c72bfabb80e29a54e3b9d365619554e1c39c36766de08124ed0e51e06f70e58e1a255ad139861e368782fbe8610b55bb7bac3faa33531630a6f63f
7
- data.tar.gz: 47b30b89aceca4377ea1d25b80458315aae5c1e349d2380087247c781c330f650c7eefeb49049615b81d9029f73aa77109ce2d2db78fd0e47cb83b8c2f5cb295
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.0.$BUILD_NUMBER.gem"
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
@@ -1,5 +1,11 @@
1
1
  version: '2'
2
2
  services:
3
+ hub:
4
+ ports:
5
+ - "4444:4444"
6
+ chrome:
7
+ ports:
8
+ - "5900:5900"
3
9
  gridium:
4
10
  volumes:
5
11
  - $GRIDIUMPATH:/gridium
data/docker-compose.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  version: '2'
2
2
  services:
3
3
  hub:
4
- image: sethuster/selenium-hub
4
+ image: selenium/hub:3.1.0
5
5
  ports:
6
6
  - "4444"
7
- firefox:
8
- image: sethuster/node-firefox-debugx
9
- ports:
10
- - "5900"
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", ">= 2.50.0", "< 3"
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 Selenium::WebDriver::Error::ScriptTimeoutError => e
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
- element.click
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
 
@@ -1,3 +1,3 @@
1
1
  module Gridium
2
- VERSION = "1.0.#{ENV['BUILD_NUMBER']}"
2
+ VERSION = "1.1.#{ENV['BUILD_NUMBER']}"
3
3
  end
data/lib/page.rb CHANGED
@@ -141,7 +141,7 @@ module Gridium
141
141
  end
142
142
 
143
143
  def check(id) #checks a checkbox
144
- Driver.driver.find_element(:id, id).click
144
+ Element.new("Checkbox", :id, id).click
145
145
  end
146
146
  end
147
147
 
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
- r = _send_request('POST', "#{@url}update_run/#{@run_info[:id]}", {:case_ids => @tc_ids})
85
- Log.debug("[GRIDIUM::TestRail] UPDATE RUN: #{r}")
86
- sleep 0.25
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.0.26
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-22 00:00:00.000000000 Z
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: 2.50.0
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: '3'
96
+ version: 3.3.0
103
97
  - !ruby/object:Gem::Dependency
104
98
  name: oily_png
105
99
  requirement: !ruby/object:Gem::Requirement