-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Spec Tests #576
Open
MatthewKennedy
wants to merge
41
commits into
main
Choose a base branch
from
fix/specs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Overhaul Spec Tests #576
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
465a4d3
Test spec fix.
MatthewKennedy bcdad52
Update rspec syntax
MatthewKennedy 2a8ad72
Use locale.
MatthewKennedy 020266e
Reset locale after test.
MatthewKennedy a27ec8a
Ensure locale is set to :en after tests.
MatthewKennedy f8b0e46
Test without spec
MatthewKennedy 8a0e2aa
Admin Test
MatthewKennedy 9cc23ed
Lint file.
MatthewKennedy d8a53fd
Lint file.
MatthewKennedy 32b4829
Store artifacts.
MatthewKennedy b9c4022
Remove useless variable assignment.
MatthewKennedy d1f78ac
Add # frozen_string_literal: true
MatthewKennedy 10a4c19
Remove duplicate check.
MatthewKennedy ab9af92
Ensure I18n.locale = :en
MatthewKennedy f0b8c50
Ensure en local is used.
MatthewKennedy de426ee
Lint file
MatthewKennedy 0d62f2e
Lint file.
MatthewKennedy 2b1c905
Lint file.
MatthewKennedy 5d83015
Use css id
MatthewKennedy 655e712
Use spree.admin_login_path(locale: 'en')
MatthewKennedy d76835d
Add current store
MatthewKennedy 94b383b
Fix current_store
MatthewKennedy 1dc4594
Lint code.
MatthewKennedy 78f9a7e
Lint files.
MatthewKennedy 27244b2
set default store.
MatthewKennedy 1bd4a86
use describe it
MatthewKennedy 3c621ca
Replace it
MatthewKennedy 6407863
Lint file.
MatthewKennedy f7f3f2b
Lint file.
MatthewKennedy 4b7651a
Fix admin sign out spec.
MatthewKennedy dc77e6f
Use admin Path
MatthewKennedy 401744e
More descriptive log_out method.
MatthewKennedy 55095f8
Lint file.
MatthewKennedy a95279e
Lint files.
MatthewKennedy 89aef7c
Us it not scenario.
MatthewKennedy c0ce112
Update Rspec syntax (Replace background with before)
MatthewKennedy c57960f
Update Rspec syntax (replace 'scenario' with 'it')
MatthewKennedy 1bd2235
Update Rspec syntax (replace 'given' with 'let')
MatthewKennedy dcc04cd
Rubocop lint files.
MatthewKennedy ae20ad9
Differentiate between admin and storefront test helpers
MatthewKennedy a9ec228
Fix target.
MatthewKennedy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ def self.activate | |
Rails.configuration.cache_classes ? require(c) : load(c) | ||
end | ||
if Spree::Auth::Engine.backend_available? | ||
Dir.glob(File.join(File.dirname(__FILE__), "../../controllers/backend/*/*/*_decorator*.rb")) do |c| | ||
Dir.glob(File.join(File.dirname(__FILE__), "../../controllers/backend/**/*_decorator*.rb")) do |c| | ||
Rails.configuration.cache_classes ? require(c) : load(c) | ||
end | ||
end | ||
|
@@ -60,10 +60,6 @@ def self.frontend_available? | |
@@frontend_available ||= Gem::Specification.find_all_by_name('spree_frontend').any? | ||
end | ||
|
||
def self.api_available? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this is safe to be removed, it's used e.g. in lib/spree/auth/engine.rb:43, to determine whether to load decorators for API classes. |
||
@@api_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Api::Engine') | ||
end | ||
|
||
def self.emails_available? | ||
@@emails_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Emails::Engine') | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Spree | ||
module TestingSupport | ||
module CheckoutHelpers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Spree | ||
module Admin | ||
RSpec.describe OrdersController, type: :controller do | ||
|
2 changes: 2 additions & 0 deletions
2
spec/controllers/spree/admin/user_sessions_controller_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)