spree_dev_tools 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spree_dev_tools/rspec/support/capybara.rb +17 -13
- data/lib/spree_dev_tools/rspec/support/spree.rb +11 -13
- data/lib/spree_dev_tools/version.rb +1 -1
- data/spree_dev_tools.gemspec +1 -4
- metadata +12 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b9358478e7b8b47145e11360abbf2d7efbd94e46da14bd3055d5d993124afa6
|
4
|
+
data.tar.gz: 3d1f5f7e7db36decd6855646028165988884d526c6718c4c788bbc57456d26ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b334f980b9ec0abd9c9a48d2a6d97a27c552f5675a27c7b46b083d6be912402e9a2cd475a60c464bbedd8bd3e298c7bed1a6249b6fdf7b65c56cd4aefbee3e
|
7
|
+
data.tar.gz: 9cb77ed683ec5a2591df6b30aafa8e7c2b5e4dbf328e971b9a33644281826aa90b5cb7d617ce0b2ebb65f7daa75342213b1080b36cb72a757b437cf922df9fae
|
@@ -5,21 +5,25 @@ require 'capybara/rails'
|
|
5
5
|
require 'selenium-webdriver'
|
6
6
|
require 'capybara-select-2'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
Capybara.configure do |config|
|
9
|
+
config.save_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
|
10
|
+
config.server = :puma
|
11
|
+
config.default_driver = :rack_test
|
12
|
+
config.javascript_driver = :selenium_chrome_headless
|
13
|
+
config.default_max_wait_time = ENV.fetch('CAPYBARA_MAX_WAIT_TIME', 45).to_i
|
14
|
+
config.always_include_port = true
|
15
|
+
config.match = :smart
|
16
|
+
config.ignore_hidden_elements = true
|
17
|
+
end
|
11
18
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
log_level: :error
|
17
|
-
)
|
18
|
-
end
|
19
|
-
Capybara.javascript_driver = :chrome
|
19
|
+
if ENV['WEBDRIVER'] == 'accessible'
|
20
|
+
require 'capybara/accessible'
|
21
|
+
Capybara.javascript_driver = :accessible
|
22
|
+
end
|
20
23
|
|
21
|
-
|
22
|
-
|
24
|
+
RSpec.configure do |config|
|
25
|
+
config.before(:each, js: true) do
|
26
|
+
Capybara.page.driver.browser.manage.window.resize_to(1400, 900)
|
23
27
|
end
|
24
28
|
|
25
29
|
config.include CapybaraSelect2
|
@@ -11,12 +11,6 @@ require 'spree/testing_support/auth_helpers'
|
|
11
11
|
require 'spree/testing_support/checkout_helpers'
|
12
12
|
require 'spree/testing_support/caching'
|
13
13
|
|
14
|
-
# API helpers
|
15
|
-
if defined?(Spree::Api)
|
16
|
-
require 'spree/api/testing_support/helpers'
|
17
|
-
require 'spree/api/testing_support/setup'
|
18
|
-
end
|
19
|
-
|
20
14
|
# API v2 helpers
|
21
15
|
if defined?(Spree::Api) && Spree.version.to_f >= 3.7
|
22
16
|
require 'jsonapi/rspec'
|
@@ -48,19 +42,23 @@ RSpec.configure do |config|
|
|
48
42
|
config.include Spree::TestingSupport::AuthHelpers, type: :feature
|
49
43
|
config.include Spree::TestingSupport::CheckoutHelpers, type: :feature
|
50
44
|
|
51
|
-
if defined?(Spree::Api)
|
52
|
-
config.include Spree::Api::TestingSupport::Helpers # needed for API v1
|
53
|
-
config.extend Spree::Api::TestingSupport::Setup, type: :request
|
54
|
-
end
|
55
45
|
if Spree.version.to_f >= 3.7
|
56
46
|
config.include JSONAPI::RSpec, type: :request # required for API v2 request specs
|
57
47
|
end
|
58
48
|
|
59
49
|
config.before :each do
|
60
50
|
Rails.cache.clear
|
61
|
-
|
62
|
-
|
51
|
+
|
52
|
+
country = create(:country, name: 'United States of America', iso_name: 'UNITED STATES', iso: 'US', states_required: true)
|
53
|
+
|
54
|
+
reset_spree_preferences do |spree_config|
|
55
|
+
spree_config.default_country_id = country.id
|
56
|
+
end
|
57
|
+
|
58
|
+
if Spree.version.to_f >= 4.2
|
59
|
+
create(:store, default: true, default_country: country)
|
60
|
+
else
|
61
|
+
create(:store, default: true)
|
63
62
|
end
|
64
|
-
create(:store)
|
65
63
|
end
|
66
64
|
end
|
data/spree_dev_tools.gemspec
CHANGED
@@ -26,15 +26,12 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_dependency 'capybara'
|
27
27
|
s.add_dependency 'capybara-screenshot'
|
28
28
|
s.add_dependency 'capybara-select-2'
|
29
|
-
s.add_dependency 'coffee-rails'
|
30
29
|
s.add_dependency 'database_cleaner'
|
31
30
|
s.add_dependency 'factory_bot', '~> 4.7'
|
32
31
|
s.add_dependency 'ffaker'
|
33
32
|
s.add_dependency 'gem-release'
|
34
33
|
s.add_dependency 'github_changelog_generator'
|
35
34
|
s.add_dependency 'jsonapi-rspec'
|
36
|
-
s.add_dependency 'mysql2'
|
37
|
-
s.add_dependency 'pg'
|
38
35
|
s.add_dependency 'pry'
|
39
36
|
s.add_dependency 'puma'
|
40
37
|
s.add_dependency 'rails-controller-testing'
|
@@ -48,7 +45,7 @@ Gem::Specification.new do |s|
|
|
48
45
|
s.add_dependency 'selenium-webdriver'
|
49
46
|
s.add_dependency 'simplecov'
|
50
47
|
s.add_dependency 'spree_core'
|
51
|
-
s.add_dependency 'sqlite3'
|
52
48
|
s.add_dependency 'timecop'
|
53
49
|
s.add_dependency 'webdrivers', '~> 4.3'
|
50
|
+
s.add_dependency 'rspec_junit_formatter', '~> 0.4'
|
54
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_dev_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spark Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: coffee-rails
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: database_cleaner
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,34 +164,6 @@ dependencies:
|
|
178
164
|
- - ">="
|
179
165
|
- !ruby/object:Gem::Version
|
180
166
|
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: mysql2
|
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: pg
|
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
167
|
- !ruby/object:Gem::Dependency
|
210
168
|
name: pry
|
211
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -389,7 +347,7 @@ dependencies:
|
|
389
347
|
- !ruby/object:Gem::Version
|
390
348
|
version: '0'
|
391
349
|
- !ruby/object:Gem::Dependency
|
392
|
-
name:
|
350
|
+
name: timecop
|
393
351
|
requirement: !ruby/object:Gem::Requirement
|
394
352
|
requirements:
|
395
353
|
- - ">="
|
@@ -403,33 +361,33 @@ dependencies:
|
|
403
361
|
- !ruby/object:Gem::Version
|
404
362
|
version: '0'
|
405
363
|
- !ruby/object:Gem::Dependency
|
406
|
-
name:
|
364
|
+
name: webdrivers
|
407
365
|
requirement: !ruby/object:Gem::Requirement
|
408
366
|
requirements:
|
409
|
-
- - "
|
367
|
+
- - "~>"
|
410
368
|
- !ruby/object:Gem::Version
|
411
|
-
version: '
|
369
|
+
version: '4.3'
|
412
370
|
type: :runtime
|
413
371
|
prerelease: false
|
414
372
|
version_requirements: !ruby/object:Gem::Requirement
|
415
373
|
requirements:
|
416
|
-
- - "
|
374
|
+
- - "~>"
|
417
375
|
- !ruby/object:Gem::Version
|
418
|
-
version: '
|
376
|
+
version: '4.3'
|
419
377
|
- !ruby/object:Gem::Dependency
|
420
|
-
name:
|
378
|
+
name: rspec_junit_formatter
|
421
379
|
requirement: !ruby/object:Gem::Requirement
|
422
380
|
requirements:
|
423
381
|
- - "~>"
|
424
382
|
- !ruby/object:Gem::Version
|
425
|
-
version: '4
|
383
|
+
version: '0.4'
|
426
384
|
type: :runtime
|
427
385
|
prerelease: false
|
428
386
|
version_requirements: !ruby/object:Gem::Requirement
|
429
387
|
requirements:
|
430
388
|
- - "~>"
|
431
389
|
- !ruby/object:Gem::Version
|
432
|
-
version: '4
|
390
|
+
version: '0.4'
|
433
391
|
description: Spree Developer Tools
|
434
392
|
email: we@sparksolutions.co
|
435
393
|
executables: []
|
@@ -475,7 +433,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
475
433
|
version: '0'
|
476
434
|
requirements:
|
477
435
|
- none
|
478
|
-
rubygems_version: 3.2.
|
436
|
+
rubygems_version: 3.2.32
|
479
437
|
signing_key:
|
480
438
|
specification_version: 4
|
481
439
|
summary: Spree Dev Tools
|