generic_test 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/Dockerfile +0 -2
- data/exe/generic_test +5 -1
- data/generic_test.gemspec +0 -4
- data/lib/generic_test/html_reporter.rb +0 -13
- data/lib/generic_test/page.rb +1 -1
- data/lib/generic_test/setup.rb +1 -1
- data/lib/generic_test/version.rb +1 -1
- data/lib/generic_test.rb +0 -1
- metadata +1 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6379c81a2dea26407fa5633791cb839909581636ae394a3f691e89a25a0d6c6
|
4
|
+
data.tar.gz: a2baae840463737782dc39a89a91b1cc34a4c865b4e1e542a9e67c647797e337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10440d8210e40574dba8ec815443bed05a640ec3bd303f5a78ee8d035767e1c8faa03711446664083b4a2b6196b5f06b9db1e28b4477614965e3e8774b94afd6
|
7
|
+
data.tar.gz: ad67a5d1996580967d7deda6970a15a99cb86d96bedbb6168e5c0420c6e117bb13f62751ed14661a4cbd45f9364388bbe4a1e337ffc05da154c80cf1a8e222de
|
data/ChangeLog
CHANGED
data/Dockerfile
CHANGED
data/exe/generic_test
CHANGED
@@ -7,6 +7,10 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
|
7
7
|
|
8
8
|
# Executable for Generic Test
|
9
9
|
class Exe < Thor
|
10
|
+
def self.exit_on_failure?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
10
14
|
desc 'page page_url', 'Test web page'
|
11
15
|
def page(page_url)
|
12
16
|
ENV['PAGE_URL'] = page_url
|
@@ -16,7 +20,7 @@ class Exe < Thor
|
|
16
20
|
desc = ENV['PAGE_URL'].split('://').last.tr('/', '_')
|
17
21
|
junit_format = "-f RspecJunitFormatter --out logs/page_#{desc}.xml"
|
18
22
|
ENV['REPORT_PATH'] = "reports/#{desc}"
|
19
|
-
html_format = '--
|
23
|
+
html_format = '--format html --out report.html'
|
20
24
|
command = "rspec #{test_file_path} --format documentation --color #{junit_format} #{html_format}"
|
21
25
|
raise $CHILD_STATUS.to_s unless system command
|
22
26
|
end
|
data/generic_test.gemspec
CHANGED
@@ -28,9 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
# Development dependencies are installed too since running external tests within gem
|
29
29
|
spec.add_development_dependency 'jekyll' # For hosting test website
|
30
30
|
spec.add_development_dependency 'rake'
|
31
|
-
spec.add_dependency 'rspec-legacy_formatters' # Needed for rspec_html_reporter after RSpec 3
|
32
|
-
# This doesn't work with latest Ruby version
|
33
|
-
#spec.add_dependency 'rspec_html_reporter' # Pretty HTML reports
|
34
31
|
spec.add_dependency 'rspec_junit_formatter' # Needed for nicer reporting of rspec for use in CI
|
35
32
|
spec.add_dependency 'simplecov' # Code coverage
|
36
33
|
|
@@ -40,6 +37,5 @@ Gem::Specification.new do |spec|
|
|
40
37
|
spec.add_dependency 'spellcheck' # Check for common spelling errors
|
41
38
|
spec.add_dependency 'thor' # Command line utility
|
42
39
|
spec.add_dependency 'watir' # UI interaction
|
43
|
-
spec.add_dependency 'webdrivers' # Download chromedriver automatically
|
44
40
|
spec.add_dependency 'yamler'
|
45
41
|
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Mock implementation of Bundler for use by generic_test where Bundler.root is needed
|
4
|
-
module Bundler
|
5
|
-
class << self
|
6
|
-
# Used just so that RSpecHtmlReporter does not thrown an error
|
7
|
-
def root
|
8
|
-
''
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
require 'rspec_html_reporter'
|
data/lib/generic_test/page.rb
CHANGED
@@ -18,7 +18,7 @@ module GenericTest
|
|
18
18
|
self.emails, self.links = browser.links.partition do |link|
|
19
19
|
link.href.start_with?('mailto:')
|
20
20
|
end
|
21
|
-
links.reject! { |link| link.href.empty? || link.href.start_with?('javascript:') }
|
21
|
+
links.reject! { |link| link.href.empty? || link.href.start_with?('javascript:') || link.href.start_with?('tel:') }
|
22
22
|
emails.collect! { |link| link.href.split(':').last }
|
23
23
|
self.url = browser.url
|
24
24
|
self.html = browser.html
|
data/lib/generic_test/setup.rb
CHANGED
@@ -9,7 +9,7 @@ ENV['PAGE_NUM'] ||= '1'
|
|
9
9
|
browser_args = %w[--disable-popup-blocking --no-sandbox --disable-dev-shm-usage]
|
10
10
|
browser_args << '--headless' if ENV['HEADLESS'] == 'true'
|
11
11
|
|
12
|
-
GenericTest.browser = Watir::Browser.new :chrome, args: browser_args
|
12
|
+
GenericTest.browser = Watir::Browser.new :chrome, options: { args: browser_args }
|
13
13
|
|
14
14
|
raise 'PAGE_URL environment variable not set' unless ENV['PAGE_URL']
|
15
15
|
|
data/lib/generic_test/version.rb
CHANGED
data/lib/generic_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generic_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Garratt
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec-legacy_formatters
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec_junit_formatter
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,20 +150,6 @@ dependencies:
|
|
164
150
|
- - ">="
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: webdrivers
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :runtime
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
153
|
- !ruby/object:Gem::Dependency
|
182
154
|
name: yamler
|
183
155
|
requirement: !ruby/object:Gem::Requirement
|