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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5dc87e6158431181b42b3d8775d112382c54617cb5f519657064bb21650a5ac
4
- data.tar.gz: 9662978df60eb50b37033056dca365c192e7891a5546159a3d4e34e6a62b6911
3
+ metadata.gz: f6379c81a2dea26407fa5633791cb839909581636ae394a3f691e89a25a0d6c6
4
+ data.tar.gz: a2baae840463737782dc39a89a91b1cc34a4c865b4e1e542a9e67c647797e337
5
5
  SHA512:
6
- metadata.gz: b079ecf7d4f14cd88d64766ed3e49f34052ee349951fdce2c9ec5785e601e8d43c826daaa87f7f693e94c7480b8bfa3d04f5649ce9fbad44793b88a13ce39f52
7
- data.tar.gz: 22192bdb59c6563dc8228292328f6a3838476143fbc8753569f3cab00c647d2bc7d326133a82330ce8a31084009f78d4ba0033d4dca921c7d73f51f408f79364
6
+ metadata.gz: 10440d8210e40574dba8ec815443bed05a640ec3bd303f5a78ee8d035767e1c8faa03711446664083b4a2b6196b5f06b9db1e28b4477614965e3e8774b94afd6
7
+ data.tar.gz: ad67a5d1996580967d7deda6970a15a99cb86d96bedbb6168e5c0420c6e117bb13f62751ed14661a4cbd45f9364388bbe4a1e337ffc05da154c80cf1a8e222de
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Version 0.2.2
2
+ * Ignore telephone numbers in links
3
+
4
+ Version 0.2.1
5
+ * Get working with Ruby 3.3
6
+
1
7
  Version 0.1.13
2
8
  * Enhancement
3
9
  * Fail if cannot find url of page provided
data/Dockerfile CHANGED
@@ -22,5 +22,3 @@ RUN export LANGUAGE=C.UTF-8
22
22
  RUN export LC_ALL=C.UTF-8
23
23
  # By running test image is checked and webdriver will be cached
24
24
  RUN generic_test page samuel-garratt.gitlab.io/generic_test/about.html
25
-
26
- ENTRYPOINT ["generic_test", "page"]
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 = '--require generic_test/html_reporter -f RspecHtmlReporter'
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'
@@ -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
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GenericTest
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.2'
5
5
  end
data/lib/generic_test.rb CHANGED
@@ -5,7 +5,6 @@ require 'generic_test/page'
5
5
  require 'generic_test/checker'
6
6
  require 'spellcheck'
7
7
  require 'watir'
8
- require 'webdrivers'
9
8
 
10
9
  # Handles testing of sites generically for common issues
11
10
  module GenericTest
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.0
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