spree_dev_tools 0.0.7 → 0.1.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: 036cfdf6e73f5ff652214808467dd86f940fbe865394f9522cf4620ff7169630
4
- data.tar.gz: 18c22a1a1f3e6ab356fbca48b25ab4472f66b1484dc0fa142b6ac0883d993da0
3
+ metadata.gz: bdb769ba0828833374145a4251fd06a687d3571a53c0da7c078c9adb1d178b15
4
+ data.tar.gz: 010f0a067d70a8c6b0f2aaf7b55b91d096527a158fdaf5c035eee3d35818f29e
5
5
  SHA512:
6
- metadata.gz: adac39f7237e74c87baf6061bd1ac73e6f14d12e147fb43b079eaf6afb41928dd6c132b777ae6a6979d967f0c20c95cb777f2f0a63a1b4993b63bfd372087ac9
7
- data.tar.gz: 9c52bd8723b4270454f6f425abb168336e8790c16fc853af95103168e09e4140361fca8635e87e33e2a90299c148ec26d6bd466e8b81d63141bcc062db991bcc
6
+ metadata.gz: '03428186d9e9c257c4525767e2c85f105332095d224a4ecf164034e3350cf1445cde7d4040b6902c91b31136813e1e622558677f6d1e1928548d99391fb78257'
7
+ data.tar.gz: 80a7b92cea75dccfe4fdec42416bbd70f72bb6e33ce117e982d328af48ecfa343ad9a9652572f059409b834768edc1e903590c87e7397eed883c83886eba5397
@@ -1,14 +1,4 @@
1
1
  # Run Coverage report
2
- require 'simplecov'
3
- SimpleCov.start do
4
- add_group 'Controllers', 'app/controllers'
5
- add_group 'Helpers', 'app/helpers'
6
- add_group 'Mailers', 'app/mailers'
7
- add_group 'Models', 'app/models'
8
- add_group 'Views', 'app/views'
9
- add_group 'Libraries', 'lib/spree'
10
- end
11
-
12
2
  require 'rspec/rails'
13
3
  require 'rspec/retry'
14
4
  require 'ffaker'
@@ -18,73 +8,10 @@ require 'pry'
18
8
  # in spec/support/ and its subdirectories.
19
9
  Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].sort.each { |f| require f }
20
10
 
21
- # Requires factories and other useful helpers defined in spree_core.
22
- require 'spree/testing_support/authorization_helpers'
23
- require 'spree/testing_support/capybara_ext'
24
- require 'spree/testing_support/factories'
25
- require 'spree/testing_support/preferences'
26
- require 'spree/testing_support/controller_requests'
27
- require 'spree/testing_support/flash'
28
- require 'spree/testing_support/url_helpers'
29
- require 'spree/testing_support/order_walkthrough'
30
- require 'spree/testing_support/auth_helpers'
31
- require 'spree/testing_support/checkout_helpers'
32
- require 'spree/testing_support/caching'
33
-
34
- # API v2 helpers
35
- require 'spree/api/testing_support/v2/base'
36
- require 'spree/api/testing_support/v2/current_order'
37
-
38
- if defined?(Warden)
39
- include Warden::Test::Helpers
40
- Warden.test_mode!
41
- end
42
-
43
11
  RSpec.configure do |config|
44
12
  # Infer an example group's spec type from the file location.
45
13
  config.infer_spec_type_from_file_location!
46
14
 
47
- # == URL Helpers
48
- #
49
- # Allows access to Spree's routes in specs:
50
- #
51
- # visit spree.admin_path
52
- # current_path.should eql(spree.products_path)
53
- config.include Spree::TestingSupport::UrlHelpers
54
-
55
- # == Requests support
56
- #
57
- # Adds convenient methods to request Spree's controllers
58
- # spree_get :index
59
- config.include Spree::TestingSupport::ControllerRequests, type: :controller
60
-
61
- config.include Spree::TestingSupport::Preferences
62
- config.include Spree::TestingSupport::Flash
63
-
64
- config.include Spree::TestingSupport::AuthHelpers, type: :feature
65
- config.include Spree::TestingSupport::CheckoutHelpers, type: :feature
66
-
67
- config.before :each do
68
- Rails.cache.clear
69
- reset_spree_preferences do |config|
70
- # config.my_custom_preference = 10
71
- end
72
- create(:store)
73
- end
74
-
75
- if defined?(Devise)
76
- config.before(:each, type: :controller) do
77
- @request.env['devise.mapping'] = Devise.mappings[:spree_user]
78
- end
79
-
80
- config.include Devise::Test::ControllerHelpers, type: :controller
81
-
82
- config.include Warden::Test::Helpers
83
- config.before :suite do
84
- Warden.test_mode!
85
- end
86
- end
87
-
88
15
  # == Mock Framework
89
16
  #
90
17
  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
@@ -108,4 +35,8 @@ RSpec.configure do |config|
108
35
  config.verbose_retry = true
109
36
  # show exception that triggers a retry if verbose_retry is set to true
110
37
  config.display_try_failure_messages = true
38
+
39
+ config.around :each, :js do |ex|
40
+ ex.run_with_retry retry: 3
41
+ end
111
42
  end
@@ -3,15 +3,16 @@ require 'capybara-screenshot'
3
3
  require 'capybara-screenshot/rspec'
4
4
  require 'capybara/rails'
5
5
  require 'selenium-webdriver'
6
+ require 'capybara-select-2'
6
7
 
7
- RSpec.configure do
8
+ RSpec.configure do |config|
8
9
  Capybara.register_driver :chrome do |app|
9
10
  Selenium::WebDriver.logger.level = :error
10
11
 
11
12
  Capybara::Selenium::Driver.new app,
12
13
  browser: :chrome,
13
14
  options: Selenium::WebDriver::Chrome::Options.new(
14
- args: %w[headless disable-gpu window-size=1920,1080 --no-sandbox --enable-features=NetworkService,NetworkServiceInProcess --disable-features=VizDisplayCompositor],
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],
15
16
  log_level: :error
16
17
  )
17
18
  end
@@ -20,4 +21,6 @@ RSpec.configure do
20
21
  Capybara::Screenshot.register_driver(:chrome) do |driver, path|
21
22
  driver.browser.save_screenshot(path)
22
23
  end
24
+
25
+ config.include CapybaraSelect2
23
26
  end
@@ -0,0 +1,19 @@
1
+ if defined?(Warden)
2
+ include Warden::Test::Helpers
3
+ Warden.test_mode!
4
+ end
5
+
6
+ if defined?(Devise)
7
+ RSpec.configure do |config|
8
+ config.before(:each, type: :controller) do
9
+ @request.env['devise.mapping'] = Devise.mappings[:spree_user]
10
+ end
11
+
12
+ config.include Devise::Test::ControllerHelpers, type: :controller
13
+
14
+ config.include Warden::Test::Helpers
15
+ config.before :suite do
16
+ Warden.test_mode!
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,10 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start do
4
+ add_group 'Controllers', 'app/controllers'
5
+ add_group 'Helpers', 'app/helpers'
6
+ add_group 'Mailers', 'app/mailers'
7
+ add_group 'Models', 'app/models'
8
+ add_group 'Views', 'app/views'
9
+ add_group 'Libraries', 'lib/spree'
10
+ end
@@ -0,0 +1,49 @@
1
+ # Requires factories and other useful helpers defined in spree_core.
2
+ require 'spree/testing_support/authorization_helpers'
3
+ require 'spree/testing_support/capybara_ext'
4
+ require 'spree/testing_support/factories'
5
+ require 'spree/testing_support/preferences'
6
+ require 'spree/testing_support/controller_requests'
7
+ require 'spree/testing_support/flash'
8
+ require 'spree/testing_support/url_helpers'
9
+ require 'spree/testing_support/order_walkthrough'
10
+ require 'spree/testing_support/auth_helpers'
11
+ require 'spree/testing_support/checkout_helpers'
12
+ require 'spree/testing_support/caching'
13
+
14
+ # API v2 helpers
15
+ require 'spree/api/testing_support/v2/base'
16
+ require 'spree/api/testing_support/v2/current_order'
17
+
18
+ RSpec.configure do |config|
19
+ # Infer an example group's spec type from the file location.
20
+ config.infer_spec_type_from_file_location!
21
+
22
+ # == URL Helpers
23
+ #
24
+ # Allows access to Spree's routes in specs:
25
+ #
26
+ # visit spree.admin_path
27
+ # current_path.should eql(spree.products_path)
28
+ config.include Spree::TestingSupport::UrlHelpers
29
+
30
+ # == Requests support
31
+ #
32
+ # Adds convenient methods to request Spree's controllers
33
+ # spree_get :index
34
+ config.include Spree::TestingSupport::ControllerRequests, type: :controller
35
+
36
+ config.include Spree::TestingSupport::Preferences
37
+ config.include Spree::TestingSupport::Flash
38
+
39
+ config.include Spree::TestingSupport::AuthHelpers, type: :feature
40
+ config.include Spree::TestingSupport::CheckoutHelpers, type: :feature
41
+
42
+ config.before :each do
43
+ Rails.cache.clear
44
+ reset_spree_preferences do |config|
45
+ # config.my_custom_preference = 10
46
+ end
47
+ create(:store)
48
+ end
49
+ end
@@ -9,8 +9,8 @@ module SpreeDevTools
9
9
 
10
10
  module VERSION
11
11
  MAJOR = 0
12
- MINOR = 0
13
- TINY = 7
12
+ MINOR = 1
13
+ TINY = 2
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
16
16
  end
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency 'awesome_print'
26
26
  s.add_dependency 'capybara'
27
27
  s.add_dependency 'capybara-screenshot'
28
+ s.add_dependency 'capybara-select-2'
28
29
  s.add_dependency 'coffee-rails'
29
30
  s.add_dependency 'database_cleaner'
30
31
  s.add_dependency 'factory_bot', '~> 4.7'
@@ -40,5 +41,6 @@ Gem::Specification.new do |s|
40
41
  s.add_dependency 'selenium-webdriver'
41
42
  s.add_dependency 'simplecov'
42
43
  s.add_dependency 'sqlite3'
44
+ s.add_dependency 'timecop'
43
45
  s.add_dependency 'webdrivers', '~> 4.3.0'
44
46
  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.0.7
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spark Solutions
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-18 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: capybara-select-2
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: coffee-rails
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -276,6 +290,20 @@ dependencies:
276
290
  - - ">="
277
291
  - !ruby/object:Gem::Version
278
292
  version: '0'
293
+ - !ruby/object:Gem::Dependency
294
+ name: timecop
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - ">="
298
+ - !ruby/object:Gem::Version
299
+ version: '0'
300
+ type: :runtime
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - ">="
305
+ - !ruby/object:Gem::Version
306
+ version: '0'
279
307
  - !ruby/object:Gem::Dependency
280
308
  name: webdrivers
281
309
  requirement: !ruby/object:Gem::Requirement
@@ -308,7 +336,10 @@ files:
308
336
  - lib/spree_dev_tools/rspec/support/authentication_helpers.rb
309
337
  - lib/spree_dev_tools/rspec/support/capybara.rb
310
338
  - lib/spree_dev_tools/rspec/support/database_cleaner.rb
339
+ - lib/spree_dev_tools/rspec/support/devise.rb
311
340
  - lib/spree_dev_tools/rspec/support/factory_bot.rb
341
+ - lib/spree_dev_tools/rspec/support/simplecov.rb
342
+ - lib/spree_dev_tools/rspec/support/spree.rb
312
343
  - lib/spree_dev_tools/rspec/support/spree_cart.rb
313
344
  - lib/spree_dev_tools/version.rb
314
345
  - spree_dev_tools.gemspec
@@ -316,7 +347,7 @@ homepage: https://github.com/spree/spree_dev_tools
316
347
  licenses:
317
348
  - BSD-3-Clause
318
349
  metadata: {}
319
- post_install_message:
350
+ post_install_message:
320
351
  rdoc_options: []
321
352
  require_paths:
322
353
  - lib
@@ -332,8 +363,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
363
  version: '0'
333
364
  requirements:
334
365
  - none
335
- rubygems_version: 3.0.2
336
- signing_key:
366
+ rubygems_version: 3.1.2
367
+ signing_key:
337
368
  specification_version: 4
338
369
  summary: Spree Dev Tools
339
370
  test_files: []