-
-
Notifications
You must be signed in to change notification settings - Fork 724
Release testing automation
This document is the outcome of https://github.com/openfoodfoundation/openfoodnetwork/issues/4127 and describes what level of automation has, if any, each test case of the manual release testing in our current automated test suite. This is based on the Testing Handbook v2.
Covered in: spec/features/consumer/authentication_spec.rb:47
It goes into too much detail. The code branches should go into the model test.
Can't find any test. Not even controller tests. Probably because it only renders the view for the index action and the enterprises are injected later on.
Complete your enterprise setting and check that both payment method and shipping method work for stripe and paypal
This needs clarification. What exactly is "compelte your enterprise settings"? checking payment and shipping methods work I assume means placing an order with them?
spec/requests/checkout/stripe_connect_spec.rb: worth reviewing the mocks are up to date.
#set_order
needs to be reviewed as it uses allow_any_instance.
Covered in: spec/features/consumer/shopping/checkout_spec.rb:160
spec/requests/checkout/paypal_spec.rb: It misses some layers of the stack by manually creating the payment and not going through the controller. This covers the integration with the PayPal API though. If it passes is because the requests was successful.
Products: create, edit (add an image for example), duplicate (check that image is also duplicated), delete
Creation covered in: spec/features/admin/products_spec.rb Duplication covered in: spec/features/admin/bulk_product_update_spec.rb:539 Image deletion covered in: spec/features/admin/products_spec.rb:207 Image addition and update covered in: spec/controllers/api/product_images_controller_spec.rb
Can you create on OC? Does it show in front office? Can you duplicate / edit / delete it? If you delete products do they still appear in the shopfront?
Edit OC covered in: spec/features/admin/order_cycles_spec.rb:273,416,491,512,799 Creation of OC covered in: spec/features/admin/order_cycles_spec.rb:705 Cloning OC covered in: spec/features/admin/order_cycles_spec.rb:574,826 Simplified UI for enterprises selling their produce covered in: spec/features/admin/order_cycles_spec.rb:972
Probably some of these tests go into too much detail.
Not sure about "If you delete products do they still appear in the shopfront?" needs more investigation.
Covered in: spec/features/consumer/shopping/shopping_spec.rb:289
Covered in: spec/support/request/shop_workflow.rb:4. Although that method is only used in spec/features/consumer/shopping/embedded_shopfronts_spec.rb and spec/features/consumer/shopping/variant_overrides_spec.rb
Not covered although various tests visit that URL like spec/features/consumer/shopping/shopping_spec.rb:269
Covered in: spec/features/consumer/shopping/shopping_spec.rb:276
Login covered in: spec/features/consumer/authentication.rb Login at checkout covered in: spec/features/consumer/shopping/checkout_auth_spec.rb
Not sure about a test covering the "proceed to checkout" button works.
Shipping methods covered in: spec/features/consumer/shopping/checkout_spec.rb:247 Payment methods covered in: spec/features/consumer/shopping/checkout_spec.rb:317
Check above for Stripe and PayPal integration tests.
Covered in: spec/features/consumer/shopping/checkout_spec.rb:148,317
To actually ensure we get the email two Datadog monitors have been enabled: https://app.datadoghq.com/monitors#13031099, https://app.datadoghq.com/monitors#13031106.
Covered in: spec/features/admin/orders_spec.rb
We don't check it's the outcome of a checkout but it's fine.
Order for producer: can you see it? Can you filter on the page? Can you ship it? Can you capture payments? Can you create an order as an admin?
Adding a customer covered in spec/features/admin/customers_spec.rb:286 Editing a customer covered in spec/features/admin/customers_spec.rb:96. Excludes billing and shipping address.
Specs in spec/features/admin/bulk_order_management_spec.rb:33,85 are better as view or controller specs.
These are done as part of the setup phase of the following tests.
Logged in as the admin in almost all the tests below.
Covered in: spec/features/admin/bulk_order_management_spec.rb:17
Covered in: spec/features/admin/bulk_order_management_spec.rb:190
Covered in: spec/features/admin/bulk_order_management_spec.rb:208
As a consumer of a shop, covered in: spec/features/consumer/shopping/orders_spec.rb:177
No other scenarios seem to be covered.
Covered in almost all tests in spec/features/consumer/shopping/orders_spec.rb using AdminHelper#toggle_columns
.
Not a product but an email
Covered in: spec/features/admin/bulk_order_management_spec.rb:434
Covered in: spec/features/admin/bulk_order_management_spec.rb:445
Covered in: spec/features/admin/enterprises_spec.rb:178,207
Covered in: spec/features/admin/schedules_spec.rb:21
Partically covered in: spec/jobs/subscription_placement_job_spec.rb:41
To actually ensure the job is triggered when configured in config/schedule.rb we enabled two Datadog monitors to alert us: https://app.datadoghq.com/monitors/13031025, https://app.datadoghq.com/monitors/13031012
Covered by spec/lib/open_food_network/subscription_summarizer_spec.rb:92,108 and spec/mailers/subscription_mailer_spec.rb
Covered in: spec/mailers/subscription_mailer_spec.rb:26
Covered in: spec/features/admin/subscriptions_spec.rb:28
Covered in: spec/features/admin/variant_overrides_spec.rb:136
Covered in: spec/features/admin/variant_overrides_spec.rb:136
Does not seem to be covered. Not even in the controller tests, where it makes sense.
Covered in: spec/features/admin/variant_overrides_spec.rb:323
Covered in: spec/features/admin/reports_spec.rb:239
Briefly covered in: spec/features/admin/reports/packing_report_spec.rb:19
Too briefly covered in: spec/features/admin/reports_spec.rb:34 Pretty decent unit test coverage in spec/lib/open_food_network/customers_report_spec.rb.
Covered in: spec/features/admin/reports_spec.rb:390
Covered in: spec/features/admin/reports_spec.rb:178
spec/features/consumer/sitemap_spec.rb should be route and view tests perhaps. We don't need to boot a browser to check that.
Isn't this duplicating existing tests?
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design