pludoni_rspec 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +43 -88
- data/lib/pludoni_rspec/{apparition.rb → cuprite.rb} +15 -10
- data/lib/pludoni_rspec/shared_context.rb +2 -1
- data/lib/pludoni_rspec/spec_helper.rb +18 -0
- data/lib/pludoni_rspec/system_test_chrome_helper.rb +14 -1
- data/lib/pludoni_rspec/version.rb +1 -1
- data/lib/pludoni_rspec.rb +4 -15
- data/pludoni_rspec.gemspec +1 -8
- metadata +5 -91
- data/lib/pludoni_rspec/capybara.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b72e0775bf6c566724426d4dbca91688ff5ced3184b5066827e1423aee809077
|
4
|
+
data.tar.gz: b64724440621fecc9ec44ccfa0d2793b8d860ce2b8f4c99b3a7c0293a8877dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5258d9af77b69778feb054685e5f5953f5c78175a6be63ab1521578253d8c8ff1fa1fa8556d7da92bf1c34f5e0070ab1d74fb933c3dce8840fea1e696388fe8c
|
7
|
+
data.tar.gz: af776e0bdb2afd7714f76412cd7016a88d31d7d726757f4f9bce206911f0148d4214e5a556b4bad2c3792767cc98183ce3c9abf6c86cad6480961715cfd872ff
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
### 0.10
|
2
|
+
|
3
|
+
- Optional Vite build before first system spec
|
4
|
+
- Cuprite default
|
5
|
+
- ViewComponent TestHelper inclusion
|
6
|
+
- No rubocop
|
7
|
+
- local! helper to connect via ssh portforwarding
|
8
|
+
- screenshot full
|
9
|
+
|
10
|
+
### 0.9
|
11
|
+
|
12
|
+
- Gitlab artifacts integrated
|
13
|
+
- apparition revived
|
14
|
+
- Rubocop deps
|
15
|
+
|
1
16
|
### 0.5
|
2
17
|
|
3
18
|
* [9937c05c9c] - Firefox added as test driver with geckodriver-helper (Stefan Wienert)
|
data/Gemfile.lock
CHANGED
@@ -1,135 +1,90 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pludoni_rspec (0.
|
5
|
-
apparition
|
4
|
+
pludoni_rspec (0.10.0)
|
6
5
|
capybara (>= 3.13.2)
|
6
|
+
cuprite
|
7
7
|
fuubar (>= 2.3.1)
|
8
8
|
headless (>= 2.3.1)
|
9
9
|
pry-rails
|
10
10
|
puma
|
11
11
|
rspec_junit_formatter
|
12
|
-
rubocop
|
13
|
-
rubocop-performance
|
14
|
-
rubocop-rails
|
15
|
-
rubocop-rspec
|
16
|
-
selenium-webdriver (>= 3.141.0)
|
17
12
|
simplecov (>= 0.16.1)
|
18
13
|
simplecov-cobertura
|
19
|
-
webdrivers (>= 4.0.0)
|
20
14
|
|
21
15
|
GEM
|
22
16
|
remote: https://rubygems.org/
|
23
17
|
specs:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
minitest (>= 5.1)
|
28
|
-
tzinfo (~> 2.0)
|
29
|
-
zeitwerk (~> 2.3)
|
30
|
-
addressable (2.7.0)
|
31
|
-
public_suffix (>= 2.0.2, < 5.0)
|
32
|
-
apparition (0.6.0)
|
33
|
-
capybara (~> 3.13, < 4)
|
34
|
-
websocket-driver (>= 0.6.5)
|
35
|
-
ast (2.4.2)
|
36
|
-
capybara (3.35.3)
|
18
|
+
addressable (2.8.1)
|
19
|
+
public_suffix (>= 2.0.2, < 6.0)
|
20
|
+
capybara (3.38.0)
|
37
21
|
addressable
|
22
|
+
matrix
|
38
23
|
mini_mime (>= 0.1.3)
|
39
24
|
nokogiri (~> 1.8)
|
40
25
|
rack (>= 1.6.0)
|
41
26
|
rack-test (>= 0.6.3)
|
42
27
|
regexp_parser (>= 1.5, < 3.0)
|
43
28
|
xpath (~> 3.2)
|
44
|
-
childprocess (3.0.0)
|
45
29
|
coderay (1.1.3)
|
46
|
-
concurrent-ruby (1.
|
47
|
-
|
30
|
+
concurrent-ruby (1.2.2)
|
31
|
+
cuprite (0.14.3)
|
32
|
+
capybara (~> 3.0)
|
33
|
+
ferrum (~> 0.13.0)
|
34
|
+
docile (1.4.0)
|
35
|
+
ferrum (0.13)
|
36
|
+
addressable (~> 2.5)
|
37
|
+
concurrent-ruby (~> 1.1)
|
38
|
+
webrick (~> 1.7)
|
39
|
+
websocket-driver (>= 0.6, < 0.8)
|
48
40
|
fuubar (2.5.1)
|
49
41
|
rspec-core (~> 3.0)
|
50
42
|
ruby-progressbar (~> 1.4)
|
51
43
|
headless (2.3.1)
|
52
|
-
|
53
|
-
concurrent-ruby (~> 1.0)
|
44
|
+
matrix (0.4.2)
|
54
45
|
method_source (1.0.0)
|
55
|
-
mini_mime (1.
|
56
|
-
mini_portile2 (2.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
mini_portile2 (~> 2.5.0)
|
46
|
+
mini_mime (1.1.2)
|
47
|
+
mini_portile2 (2.8.1)
|
48
|
+
nio4r (2.5.8)
|
49
|
+
nokogiri (1.14.2)
|
50
|
+
mini_portile2 (~> 2.8.0)
|
61
51
|
racc (~> 1.4)
|
62
|
-
|
63
|
-
parser (3.0.0.0)
|
64
|
-
ast (~> 2.4.1)
|
65
|
-
pry (0.14.0)
|
52
|
+
pry (0.14.2)
|
66
53
|
coderay (~> 1.1)
|
67
54
|
method_source (~> 1.0)
|
68
55
|
pry-rails (0.3.9)
|
69
56
|
pry (>= 0.10.4)
|
70
|
-
public_suffix (
|
71
|
-
puma (
|
57
|
+
public_suffix (5.0.1)
|
58
|
+
puma (6.1.1)
|
72
59
|
nio4r (~> 2.0)
|
73
|
-
racc (1.
|
74
|
-
rack (
|
75
|
-
rack-test (
|
76
|
-
rack (>= 1.
|
77
|
-
rainbow (3.0.0)
|
60
|
+
racc (1.6.2)
|
61
|
+
rack (3.0.4.2)
|
62
|
+
rack-test (2.0.2)
|
63
|
+
rack (>= 1.3)
|
78
64
|
rake (13.0.1)
|
79
|
-
regexp_parser (2.
|
80
|
-
rexml (3.2.
|
81
|
-
rspec-core (3.
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-support (3.
|
84
|
-
rspec_junit_formatter (0.
|
65
|
+
regexp_parser (2.7.0)
|
66
|
+
rexml (3.2.5)
|
67
|
+
rspec-core (3.12.1)
|
68
|
+
rspec-support (~> 3.12.0)
|
69
|
+
rspec-support (3.12.0)
|
70
|
+
rspec_junit_formatter (0.6.0)
|
85
71
|
rspec-core (>= 2, < 4, != 2.12.0)
|
86
|
-
|
87
|
-
|
88
|
-
parser (>= 3.0.0.0)
|
89
|
-
rainbow (>= 2.2.2, < 4.0)
|
90
|
-
regexp_parser (>= 1.8, < 3.0)
|
91
|
-
rexml
|
92
|
-
rubocop-ast (>= 1.2.0, < 2.0)
|
93
|
-
ruby-progressbar (~> 1.7)
|
94
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
95
|
-
rubocop-ast (1.4.1)
|
96
|
-
parser (>= 2.7.1.5)
|
97
|
-
rubocop-performance (1.10.2)
|
98
|
-
rubocop (>= 0.90.0, < 2.0)
|
99
|
-
rubocop-ast (>= 0.4.0)
|
100
|
-
rubocop-rails (2.9.1)
|
101
|
-
activesupport (>= 4.2.0)
|
102
|
-
rack (>= 1.1)
|
103
|
-
rubocop (>= 0.90.0, < 2.0)
|
104
|
-
rubocop-rspec (2.2.0)
|
105
|
-
rubocop (~> 1.0)
|
106
|
-
rubocop-ast (>= 1.1.0)
|
107
|
-
ruby-progressbar (1.11.0)
|
108
|
-
rubyzip (2.3.0)
|
109
|
-
selenium-webdriver (3.142.7)
|
110
|
-
childprocess (>= 0.5, < 4.0)
|
111
|
-
rubyzip (>= 1.2.2)
|
112
|
-
simplecov (0.21.2)
|
72
|
+
ruby-progressbar (1.13.0)
|
73
|
+
simplecov (0.22.0)
|
113
74
|
docile (~> 1.1)
|
114
75
|
simplecov-html (~> 0.11)
|
115
76
|
simplecov_json_formatter (~> 0.1)
|
116
|
-
simplecov-cobertura (1.
|
117
|
-
|
77
|
+
simplecov-cobertura (2.1.0)
|
78
|
+
rexml
|
79
|
+
simplecov (~> 0.19)
|
118
80
|
simplecov-html (0.12.3)
|
119
|
-
simplecov_json_formatter (0.1.
|
120
|
-
|
121
|
-
|
122
|
-
unicode-display_width (2.0.0)
|
123
|
-
webdrivers (4.6.0)
|
124
|
-
nokogiri (~> 1.6)
|
125
|
-
rubyzip (>= 1.3.0)
|
126
|
-
selenium-webdriver (>= 3.0, < 4.0)
|
127
|
-
websocket-driver (0.7.3)
|
81
|
+
simplecov_json_formatter (0.1.4)
|
82
|
+
webrick (1.8.1)
|
83
|
+
websocket-driver (0.7.5)
|
128
84
|
websocket-extensions (>= 0.1.0)
|
129
85
|
websocket-extensions (0.1.5)
|
130
86
|
xpath (3.2.0)
|
131
87
|
nokogiri (~> 1.8)
|
132
|
-
zeitwerk (2.4.2)
|
133
88
|
|
134
89
|
PLATFORMS
|
135
90
|
ruby
|
@@ -1,19 +1,24 @@
|
|
1
1
|
require "capybara"
|
2
|
+
require 'capybara/cuprite'
|
2
3
|
require "headless"
|
3
4
|
require "puma"
|
4
5
|
require 'pludoni_rspec/system_test_chrome_helper'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
Capybara::Apparition::Driver.new(app, js_errors: true, browser_options: { 'no-sandbox' => true })
|
9
|
-
end
|
10
|
-
Capybara.register_driver :apparition do |app|
|
7
|
+
Capybara.register_driver(:cuprite) do |app|
|
8
|
+
options = {}
|
11
9
|
if ENV['CI']
|
12
|
-
options[
|
10
|
+
options['no-sandbox'] = nil
|
13
11
|
end
|
14
|
-
Capybara::
|
12
|
+
Capybara::Cuprite::Driver.new(app,
|
13
|
+
window_size: [1200, 800],
|
14
|
+
browser_options: options,
|
15
|
+
js_errors: true,
|
16
|
+
timeout: 20,
|
17
|
+
process_timeout: 15,
|
18
|
+
inspector: ENV['INSPECTOR']
|
19
|
+
)
|
15
20
|
end
|
16
|
-
Capybara.javascript_driver = :
|
21
|
+
Capybara.javascript_driver = :cuprite
|
17
22
|
|
18
23
|
RSpec.configure do |c|
|
19
24
|
c.include PludoniRspec::SystemTestChromeHelper, type: :feature
|
@@ -24,10 +29,10 @@ RSpec.configure do |c|
|
|
24
29
|
end
|
25
30
|
c.before(:each, type: :system) do
|
26
31
|
if defined?(driven_by)
|
27
|
-
driven_by :
|
32
|
+
driven_by :cuprite
|
28
33
|
end
|
29
34
|
end
|
30
|
-
c.around(:
|
35
|
+
c.around(:example, js: true) do |ex|
|
31
36
|
begin
|
32
37
|
if !@headless and PludoniRspec::Config.wrap_js_spec_in_headless
|
33
38
|
@headless = Headless.new(destroy_at_exit: true, reuse: true)
|
@@ -24,7 +24,8 @@ if defined?(ActionMailer::Base)
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def extract_link_from(mail, link: 0)
|
27
|
-
|
27
|
+
body = mail.html_part.presence&.decoded || mail.body.raw_source
|
28
|
+
link = Nokogiri::HTML.fragment(body.to_s).search('a')[link]['href']
|
28
29
|
URI.parse(link).tap { |i| i.host = nil; i.scheme = nil }.to_s
|
29
30
|
end
|
30
31
|
end
|
@@ -15,6 +15,7 @@ RSpec.configure do |config|
|
|
15
15
|
mocks.verify_partial_doubles = true
|
16
16
|
end
|
17
17
|
|
18
|
+
config.bisect_runner = :shell
|
18
19
|
config.order = :defined
|
19
20
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
20
21
|
config.infer_spec_type_from_file_location!
|
@@ -28,6 +29,23 @@ RSpec.configure do |config|
|
|
28
29
|
config.filter_gems_from_backtrace("fabrication")
|
29
30
|
config.filter_gems_from_backtrace("grape")
|
30
31
|
config.filter_gems_from_backtrace("rack")
|
32
|
+
if defined?(ViewComponent)
|
33
|
+
config.include ViewComponent::TestHelpers, type: :component
|
34
|
+
config.include Capybara::RSpecMatchers, type: :component
|
35
|
+
end
|
36
|
+
if defined?(ViteRuby)
|
37
|
+
# rubocop:disable Style/GlobalVars
|
38
|
+
config.before(:each, type: :system) do
|
39
|
+
unless $vite_build
|
40
|
+
puts "\e[31mPrecompiling Vite for system specs \e[0m"
|
41
|
+
bm = Benchmark.measure do
|
42
|
+
ViteRuby.commands.build
|
43
|
+
end
|
44
|
+
$vite_build = true
|
45
|
+
puts "\e[32m -> Vite build done in #{bm.real.round(2)} \e[0m"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
31
49
|
|
32
50
|
config.around(:each, :timeout) do |example|
|
33
51
|
time = 10 unless time.kind_of?(Numeric)
|
@@ -22,7 +22,7 @@ module PludoniRspec::SystemTestChromeHelper
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def screenshot(path = '1')
|
25
|
-
page.save_screenshot(Rails.root.join("public/screenshots/#{path}.png"))
|
25
|
+
page.save_screenshot(Rails.root.join("public/screenshots/#{path}.png"), full: true)
|
26
26
|
end
|
27
27
|
|
28
28
|
# skip any confirm: "Really delete?"
|
@@ -58,4 +58,17 @@ module PludoniRspec::SystemTestChromeHelper
|
|
58
58
|
|
59
59
|
raise msg
|
60
60
|
end
|
61
|
+
|
62
|
+
def local!
|
63
|
+
uri = URI.parse(page.current_url)
|
64
|
+
puts "--- Connect with local browser:"
|
65
|
+
puts " 1. Open a SSH tunnel with port forwarding to the test server:"
|
66
|
+
puts "\nssh #{ENV['LOGNAME']}@pludoni.com -L 8080:localhost:#{uri.port}\n"
|
67
|
+
puts " 2. Open in Browser: "
|
68
|
+
uri.port = nil
|
69
|
+
uri.scheme = nil
|
70
|
+
uri.host = nil
|
71
|
+
puts "\nhttp://localhost:8080#{uri}\n"
|
72
|
+
puts " Afterwards, you can close the SSH session"
|
73
|
+
end
|
61
74
|
end
|
data/lib/pludoni_rspec.rb
CHANGED
@@ -5,23 +5,16 @@ require 'json'
|
|
5
5
|
module PludoniRspec
|
6
6
|
class Config
|
7
7
|
class << self
|
8
|
-
attr_accessor :chrome_driver_version
|
9
8
|
attr_accessor :destroy_headless
|
10
9
|
attr_accessor :wrap_js_spec_in_headless
|
11
10
|
attr_accessor :chrome_arguments
|
12
11
|
attr_accessor :capybara_timeout
|
13
|
-
attr_accessor :capybara_driver
|
14
|
-
attr_accessor :firefox_arguments
|
15
|
-
attr_accessor :apparition_arguments
|
16
12
|
end
|
17
13
|
# self.chrome_driver_version = "2.36"
|
18
14
|
self.destroy_headless = false
|
19
15
|
self.wrap_js_spec_in_headless = RbConfig::CONFIG['host_os']['linux']
|
20
16
|
# self.chrome_arguments = ['headless', 'disable-gpu', "window-size=1600,1200", 'no-sandbox', 'disable-dev-shm-usage', 'lang=de']
|
21
17
|
self.capybara_timeout = ENV['CI'] == '1' ? 30 : 5
|
22
|
-
self.firefox_arguments = ['--headless', '--window-size=1600,1200']
|
23
|
-
self.apparition_arguments = { js_errors: false, screen_size: [1600, 1200], window_size: [1600, 1200], browser_logger: File.open(File::NULL, 'w') }
|
24
|
-
self.capybara_driver = :apparition
|
25
18
|
end
|
26
19
|
def self.run
|
27
20
|
ENV["RAILS_ENV"] ||= 'test'
|
@@ -30,13 +23,8 @@ module PludoniRspec
|
|
30
23
|
require File.expand_path("config/environment", Dir.pwd)
|
31
24
|
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
32
25
|
require 'rspec/rails'
|
33
|
-
|
34
26
|
require 'pludoni_rspec/spec_helper'
|
35
|
-
|
36
|
-
require 'pludoni_rspec/apparition'
|
37
|
-
else
|
38
|
-
require 'pludoni_rspec/capybara'
|
39
|
-
end
|
27
|
+
require 'pludoni_rspec/cuprite'
|
40
28
|
require 'pludoni_rspec/freeze_time'
|
41
29
|
require 'pludoni_rspec/shared_context'
|
42
30
|
if defined?(VCR)
|
@@ -50,18 +38,19 @@ module PludoniRspec
|
|
50
38
|
end
|
51
39
|
|
52
40
|
def self.coverage!
|
53
|
-
if File.
|
41
|
+
if File.exist?('coverage/.resultset.json') && (
|
54
42
|
File.ctime('coverage/.resultset.json') < (Time.now - 900) ||
|
55
43
|
(JSON.parse(File.read('coverage/.resultset.json')).keys.length > 4)
|
56
44
|
)
|
57
45
|
File.unlink('coverage/.resultset.json')
|
58
|
-
if File.
|
46
|
+
if File.exist?('coverage/.resultset.json.lock')
|
59
47
|
File.unlink('coverage/.resultset.json.lock')
|
60
48
|
end
|
61
49
|
end
|
62
50
|
require 'simplecov'
|
63
51
|
SimpleCov.command_name "spec:#{Time.now.to_i}"
|
64
52
|
if ENV['CI']
|
53
|
+
require 'simplecov-cobertura'
|
65
54
|
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
66
55
|
end
|
67
56
|
SimpleCov.start 'rails' do
|
data/pludoni_rspec.gemspec
CHANGED
@@ -27,17 +27,10 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency 'headless', ">= 2.3.1"
|
28
28
|
spec.add_dependency 'pry-rails'
|
29
29
|
spec.add_dependency 'puma'
|
30
|
-
|
31
|
-
spec.add_dependency 'selenium-webdriver', ">= 3.141.0"
|
32
|
-
spec.add_dependency "webdrivers", ">= 4.0.0"
|
33
|
-
spec.add_dependency 'apparition'
|
30
|
+
spec.add_dependency 'cuprite'
|
34
31
|
spec.add_dependency 'simplecov', ">= 0.16.1"
|
35
32
|
spec.add_dependency "simplecov-cobertura"
|
36
33
|
spec.add_dependency "rspec_junit_formatter"
|
37
|
-
spec.add_dependency 'rubocop'
|
38
|
-
spec.add_dependency 'rubocop-rails'
|
39
|
-
spec.add_dependency 'rubocop-performance'
|
40
|
-
spec.add_dependency 'rubocop-rspec'
|
41
34
|
spec.add_development_dependency "bundler", "~> 1.16"
|
42
35
|
spec.add_development_dependency "rake", "~> 13.0"
|
43
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pludoni_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -81,35 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 3.141.0
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 3.141.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: webdrivers
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 4.0.0
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 4.0.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: apparition
|
84
|
+
name: cuprite
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
114
86
|
requirements:
|
115
87
|
- - ">="
|
@@ -164,62 +136,6 @@ dependencies:
|
|
164
136
|
- - ">="
|
165
137
|
- !ruby/object:Gem::Version
|
166
138
|
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rubocop
|
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
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: rubocop-rails
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :runtime
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: rubocop-performance
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
202
|
-
type: :runtime
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - ">="
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: rubocop-rspec
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :runtime
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
139
|
- !ruby/object:Gem::Dependency
|
224
140
|
name: bundler
|
225
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,8 +185,7 @@ files:
|
|
269
185
|
- exe/nf
|
270
186
|
- exe/of
|
271
187
|
- lib/pludoni_rspec.rb
|
272
|
-
- lib/pludoni_rspec/
|
273
|
-
- lib/pludoni_rspec/capybara.rb
|
188
|
+
- lib/pludoni_rspec/cuprite.rb
|
274
189
|
- lib/pludoni_rspec/devise.rb
|
275
190
|
- lib/pludoni_rspec/freeze_time.rb
|
276
191
|
- lib/pludoni_rspec/shared_context.rb
|
@@ -298,8 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
213
|
- !ruby/object:Gem::Version
|
299
214
|
version: '0'
|
300
215
|
requirements: []
|
301
|
-
|
302
|
-
rubygems_version: 2.7.6
|
216
|
+
rubygems_version: 3.2.33
|
303
217
|
signing_key:
|
304
218
|
specification_version: 4
|
305
219
|
summary: pludoni GmbH's RSpec template. Just require in spec_helper
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require "capybara"
|
2
|
-
require "selenium-webdriver"
|
3
|
-
require "headless"
|
4
|
-
require "puma"
|
5
|
-
require 'pludoni_rspec/system_test_chrome_helper'
|
6
|
-
require 'webdrivers/geckodriver'
|
7
|
-
|
8
|
-
RSpec.configure do |c|
|
9
|
-
c.before(:all, js: true) do
|
10
|
-
Webdrivers.cache_time = 86_400
|
11
|
-
Webdrivers::Geckodriver.update
|
12
|
-
end
|
13
|
-
c.include PludoniRspec::SystemTestChromeHelper, type: :feature
|
14
|
-
c.include PludoniRspec::SystemTestChromeHelper, type: :system
|
15
|
-
c.before(:all, js: true) do
|
16
|
-
# disable puma output
|
17
|
-
Capybara.server = :puma, { Silent: true }
|
18
|
-
end
|
19
|
-
c.before(:each, js: true) do
|
20
|
-
if defined?(driven_by)
|
21
|
-
driven_by :selenium_headless, using: :firefox, screen_size: [1400, 1400]
|
22
|
-
end
|
23
|
-
end
|
24
|
-
c.around(:all, js: true) do |ex|
|
25
|
-
begin
|
26
|
-
if !@headless and PludoniRspec::Config.wrap_js_spec_in_headless
|
27
|
-
@headless = Headless.new(destroy_at_exit: true, reuse: true)
|
28
|
-
@headless.start
|
29
|
-
end
|
30
|
-
ex.run
|
31
|
-
ensure
|
32
|
-
if @headless and PludoniRspec::Config.destroy_headless
|
33
|
-
@headless.destroy
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
Capybara.default_max_wait_time = PludoniRspec::Config.capybara_timeout
|