spree_dev_tools 0.0.8 → 0.1.3

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: f5f30a00bba4fa3f37fb19e03333da1dba8bf8dbff7e4d30b92e02659dbc03b5
4
- data.tar.gz: 5f629cf20585eba5d8c685f29a95c7d693179c5b367ef572edafcdadbcd9a166
3
+ metadata.gz: 94c0185fbd82b8f4af2d0d24d852b955f0943abda086a6c075babc6a607ab234
4
+ data.tar.gz: 26a8e5b2621fd8c4653008415f019d8c21c5c1f0d61f524efd8bdf88e4d4d36b
5
5
  SHA512:
6
- metadata.gz: 3f0977dc5d600f83879a873395854b2f53621de51acae74f5ccb97f5ac1b9f0f6ea10c29d27bec58ec71cf176938f3d1ddf48efe0d2b9645b1bfc067aa4283bf
7
- data.tar.gz: 74fd4d15ad566f86bc9361d7c7741307f58f2b65bb433ed2eb426ea47ab95d000e8769b1837996921a1bcc000ff8b3924d5258a59c05a01627044fe5b42bdec3
6
+ metadata.gz: eb8f2f163fb7ee16e022d98b2e371823d9be93cd34f043b9e5794e9de712b80fa41bf4340caf262964c9c8cfc620877b04ce3e3a1673d5f1f38edda793a535a4
7
+ data.tar.gz: 1c8534dc672feac3f1e56fd08c46c75ba9ac30d64903ce4c405b807852df829ec321ff738d9c6739d10dccb691cd5688d4858038164c2daa16d58b8da7723610
@@ -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,8 +3,9 @@ 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
 
@@ -20,4 +21,7 @@ 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
26
+ config.include CapybaraSelect2::Helpers
23
27
  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 = 8
12
+ MINOR = 1
13
+ TINY = 3
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.8
4
+ version: 0.1.3
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: 2021-02-01 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.2.3
367
+ signing_key:
337
368
  specification_version: 4
338
369
  summary: Spree Dev Tools
339
370
  test_files: []