Skip to content
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

Fix loading factories in extensions after the last changes in Solidus #169

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

kennyadsl
Copy link
Member

Summary

This PR reflects the last changes we made in Solidus to support the new FactoryBot loading mechanism.

We need to merge and release new versions of Solidus after solidusio/solidus#3907, merge this PR and release a new version of solidus_dev_support to have the ecosystem working again with factories.

When testing extensions using Solidus versions that support the definition_file_paths, it will load the core factory first
and then the ones defined in lib/extension_name/testing_support/factories.

If the extension has a lib/extension_name/testing_support/factories.rb file that loads all the factories into lib/extension_name/testing_support/factories/, it should be removed now. If that happens this PR will make it print a deprecation warning telling users what to do.

Checklist

  • I have structured the commits for clarity and conciseness.
  • [ ] I have added relevant automated tests for this change.

@kennyadsl kennyadsl self-assigned this Feb 17, 2021
@mergify
Copy link
Contributor

mergify bot commented Feb 17, 2021

It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:

  • bug for bugfixes.
  • enhancement for new features and improvements.
  • documentation for documentation changes.
  • security for security patches.
  • removed for feature removals.
  • infrastructure for internal changes that should not go in the changelog.

Additionally, the maintainer may also want to add one of the following:

  • breaking for breaking changes.
  • deprecated for feature deprecations.

Once the correct labels have been set, simply remove the needs changelog label label from this PR so I can merge it.

@mergify mergify bot added the needs changelog label Needs a label to determine the type of change. label Feb 17, 2021
@kennyadsl kennyadsl added bug Describes or fixes a bug. and removed needs changelog label Needs a label to determine the type of change. labels Feb 17, 2021
@kennyadsl
Copy link
Member Author

Specs failures are legit, until we merge the PR on Solidus mentioned above.

@kennyadsl kennyadsl force-pushed the kennyadsl/fix-factories-loading branch 2 times, most recently from 5bae9d8 to b5c1095 Compare February 17, 2021 12:34
This commit reflects the last changes we made in Solidus to
support the new FactoryBot loading mechanism.

When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
@kennyadsl kennyadsl force-pushed the kennyadsl/fix-factories-loading branch from b5c1095 to 68b6496 Compare February 18, 2021 20:33
@mergify mergify bot merged commit 63c9d82 into master Feb 18, 2021
@mergify mergify bot deleted the kennyadsl/fix-factories-loading branch February 18, 2021 21:55
@jarednorman
Copy link
Member

I didn't expect that. 🤔

@kennyadsl
Copy link
Member Author

No problem, this gem is mainly used from Rubygems so it does nothing until we release a new version, which is actually how all the other gems should work as well. 😬

cpfergus1 added a commit to cpfergus1/solidus_signifyd that referenced this pull request May 25, 2021
This commit reflects changes made by Solidus [PR #169](solidusio/solidus_dev_support#169 (comment))
When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_log_viewer that referenced this pull request May 25, 2021
This commit reflects changes made by Solidus [PR #169](solidusio/solidus_dev_support#169 (comment))
When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_quiet_logistics that referenced this pull request May 27, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_expedited_exchanges that referenced this pull request Jun 2, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_log_viewer that referenced this pull request Jun 2, 2021
This commit reflects changes made by Solidus [PR #169](solidusio/solidus_dev_support#169 (comment))
When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_recently_viewed that referenced this pull request Jun 2, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_shipments_add_product that referenced this pull request Jun 3, 2021
This commit reflects changes made by Solidus [PR solidusio-contrib#169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_product_assembly that referenced this pull request Jun 4, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_volume_pricing that referenced this pull request Jun 7, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_quiet_logistics that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_signifyd that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169](solidusio/solidus_dev_support#169 (comment))
When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_asset_variant_options that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_volume_pricing that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_tracking that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klaviyo that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_expedited_exchanges that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Additionally, this extention makes use of assertions
(i.e. `assert_nothing_raised) found in the version of Rails not used by
Solidus 2.10, therefore it must be manually configured in `Rspec.config`.
cpfergus1 added a commit to cpfergus1/solidus_log_viewer that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169](solidusio/solidus_dev_support#169 (comment))
When testing extensions using Solidus vesions that support
the definition_file_paths, it will load the core factory first
and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_handling_fees that referenced this pull request Jun 9, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_handling_fees that referenced this pull request Jun 10, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_handling_fees that referenced this pull request Jun 10, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_handling_fees that referenced this pull request Jun 10, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klaviyo that referenced this pull request Jun 16, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)). When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_graphql_api that referenced this pull request Jun 18, 2021
This commit reflects changes made by Solidus [PR solidusio#169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jun 23, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jun 24, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jun 24, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jul 6, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jul 6, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jul 6, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_klarna_payments that referenced this pull request Jul 6, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_sale_prices that referenced this pull request Jul 7, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_sale_prices that referenced this pull request Jul 21, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_sale_prices that referenced this pull request Jul 21, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
cpfergus1 added a commit to cpfergus1/solidus_sale_prices that referenced this pull request Jul 21, 2021
This commit reflects changes made by Solidus [PR #169]
(solidusio/solidus_dev_support#169) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
kennyadsl pushed a commit to cpfergus1/solidus_graphql_api that referenced this pull request Aug 11, 2021
This commit reflects changes made by Solidus [PR solidusio#169]
(solidusio/solidus_dev_support#169 (comment)) When testing extensions
using Solidus vesions that support the definition_file_paths,
it will load the core factory first and then the ones defined in
`lib/extension_name/testing_support/factories`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Describes or fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants