spree_dev_tools 0.1.7 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44157fb3dee5262ed2266fb1d7e6daa34787123fc686260c5c843c8351da9d8d
4
- data.tar.gz: cf216ea405b82c3964c7a6c7aaf9c0242ce7255ba47d0eca1c1eb0bc6a01eb6e
3
+ metadata.gz: '096987b2e68c5bcc9f1d8066b27bc6ca519b68d1023e39cd3f74e0032bbdff74'
4
+ data.tar.gz: 19d32e277d6501ec073e082cd58f7799d1d468b547fea462bb72934a728a71af
5
5
  SHA512:
6
- metadata.gz: cefd1cf03be24189607f46a5861340df6812ed48af2411b886d9b38c310ba4355cc71dae6aa28464225035b175432ded92c7a9d3dbd27f2b71af68d0143ebbf4
7
- data.tar.gz: 1fde4734a51198e9f481608140590661b95287cc7dc51e58513572288aacf6b2a246599e2b13c1d8b20db1738a7dc650b418a5ffe5ca0b11257307927fd3928f
6
+ metadata.gz: e8c151366a4aecc1de7991b53132b913c7a9c59364eafab29a78bf609897727cf41be2d95f619d28839aac716b755d3219d6df6c1c9c8edc1e813fd09abe3d33
7
+ data.tar.gz: '019a0c20b693799b37877930f6be9b45b5efbcc51da257db1bd1ee0f865cb8dcd9f0a70c16136af97f0cbb0fccdd3b9ba900936cdce21e2f26e792630df45345'
data/.bundle/config CHANGED
@@ -1,2 +1,2 @@
1
1
  ---
2
- BUNDLE_JOBS: "8"
2
+ BUNDLE_JOBS: "12"
@@ -1,5 +1,6 @@
1
1
  # Run Coverage report
2
2
  require 'rspec/rails'
3
+ require 'rspec/active_model/mocks'
3
4
  require 'rspec/retry'
4
5
  require 'ffaker'
5
6
  require 'pry'
@@ -5,21 +5,25 @@ require 'capybara/rails'
5
5
  require 'selenium-webdriver'
6
6
  require 'capybara-select-2'
7
7
 
8
- RSpec.configure do |config|
9
- Capybara.register_driver :chrome do |app|
10
- Selenium::WebDriver.logger.level = :error
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
- Capybara::Selenium::Driver.new app,
13
- browser: :chrome,
14
- options: Selenium::WebDriver::Chrome::Options.new(
15
- args: %w[no-sandbox disable-dev-shm-usage disable-popup-blocking headless disable-gpu window-size=1920,1080 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=VizDisplayCompositor],
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
- Capybara::Screenshot.register_driver(:chrome) do |driver, path|
22
- driver.browser.save_screenshot(path)
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
@@ -14,6 +14,7 @@ require 'spree/testing_support/caching'
14
14
  # API helpers
15
15
  if defined?(Spree::Api)
16
16
  require 'spree/api/testing_support/helpers'
17
+ require 'spree/api/testing_support/setup'
17
18
  end
18
19
 
19
20
  # API v2 helpers
@@ -49,6 +50,7 @@ RSpec.configure do |config|
49
50
 
50
51
  if defined?(Spree::Api)
51
52
  config.include Spree::Api::TestingSupport::Helpers # needed for API v1
53
+ config.extend Spree::Api::TestingSupport::Setup, type: :request
52
54
  end
53
55
  if Spree.version.to_f >= 3.7
54
56
  config.include JSONAPI::RSpec, type: :request # required for API v2 request specs
@@ -56,9 +58,17 @@ RSpec.configure do |config|
56
58
 
57
59
  config.before :each do
58
60
  Rails.cache.clear
59
- reset_spree_preferences do |config|
60
- # config.my_custom_preference = 10
61
+
62
+ country = create(:country, name: 'United States of America', iso_name: 'UNITED STATES', iso: 'US', states_required: true)
63
+
64
+ reset_spree_preferences do |spree_config|
65
+ spree_config.default_country_id = country.id
66
+ end
67
+
68
+ if Spree.version.to_f >= 4.2
69
+ create(:store, default: true, default_country: country)
70
+ else
71
+ create(:store, default: true)
61
72
  end
62
- create(:store)
63
73
  end
64
74
  end
@@ -1,5 +1,5 @@
1
1
  module SpreeDevTools
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.11'
3
3
 
4
4
  # Returns the version of the currently loaded SpreeDevTools as a
5
5
  # <tt>Gem::Version</tt>.
@@ -26,7 +26,6 @@ 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'
@@ -38,6 +37,8 @@ Gem::Specification.new do |s|
38
37
  s.add_dependency 'pry'
39
38
  s.add_dependency 'puma'
40
39
  s.add_dependency 'rails-controller-testing'
40
+ s.add_dependency 'redis'
41
+ s.add_dependency 'rspec-activemodel-mocks'
41
42
  s.add_dependency 'rspec-rails', '~> 4.0'
42
43
  s.add_dependency 'rspec-retry'
43
44
  s.add_dependency 'rubocop'
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.1.7
4
+ version: 0.1.11
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-02-08 00:00:00.000000000 Z
11
+ date: 2021-11-04 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
@@ -248,6 +234,34 @@ dependencies:
248
234
  - - ">="
249
235
  - !ruby/object:Gem::Version
250
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: redis
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: rspec-activemodel-mocks
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ">="
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: rspec-rails
253
267
  requirement: !ruby/object:Gem::Requirement