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

Better test coverage #12

Open
Tracked by #108
repl6669 opened this issue Jun 15, 2023 · 0 comments
Open
Tracked by #108

Better test coverage #12

repl6669 opened this issue Jun 15, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@repl6669
Copy link
Contributor

repl6669 commented Jun 15, 2023

Better test coverage

  • Make sure that tests work after upgrading to Lunar 0.5
  • Introduce more tests

Resources

Basics endpoint tests

  • Addresses
    • Read
    • Read (with 404 when not found)
    • Read with includes (customer, country)
    • Cannot read other users addresses
    • List
    • List with includes
    • Cannot list other users addresses
    • Store
    • Store (company_in, company_tin in meta)
    • Store (with validation)
    • Update
    • Update (with validation)
    • Update (company_in, company_tin in meta)
    • Only owner can update
    • Delete
    • Only owner can delete
    • Only one shipping address can be default
    • Only one billing address can be default
  • Attributes
    • Test attributes relation
    • Test that attributes are listed correctly in eg. product variant show / index
  • AttributeGroups
    • Test that group can be included alongside attributes
  • ProductAssociations
    • Test that associations can be included with products
    • Test including inverse associations
  • Brands
    • Read
    • Read (with 404 when not found)
    • Read with includes (default_url, thumbnail)
    • List
    • List with includes
    • Cannot CUD
  • CartAddresses
    • Store (with policy check)
    • Store (with validation)
    • Update (with policy check)
    • Update (with validation)
    • Attach shipping option
    • Attach shipping option (with validation)
    • Attach shipping option (with policy check)
    • Detach shipping option
    • Detach shipping option (with validation)
    • Detach shipping option (with policy check)
    • Update country
    • Update country (with validation)
    • Update country (with policy check)
    • Continuous update
    • Continuous update (with validation)
    • Continuous update (with policy check)
  • CartLines
    • Store
    • Store (with policy check)
    • Store (with validation)
    • Update
    • Update (with policy check)
    • Update (with validation)
    • Increments quantity when item already in cart
    • Delete (with policy check)
    • Delete (with validation)
    • Cannot read on its own (without cart) [maybe it should be possible via cart relation?]
    • Cannot list
  • Carts
    • Read "my cart" action (with policy check)
    • Read (404 when cart session expired)
    • Can merge carts after login
    • Clear cart action
    • Clear cart action (with policy check)
    • Checkout cart action
    • Checkout cart action (with policy check)
    • Checkout cart action (with validation)
    • Can register user from checkout data on demand
    • Checkout returns signed urls for order actions
    • Checkout cart (with or without forgetting cart based on config)
    • Apply coupon action
    • Apply coupon action (with validation)
    • Apply coupon action (with policy check)
  • Channels
    • List
    • Read
    • Cannot CUD
  • Collections
    • Read
    • Read with includes (default_url, urls, group, products.*)
    • List
    • List with includes
    • Cannot CUD
  • Collection groups
    • Can be included with collections
  • Countries
    • List
    • List check no includes possible (cannot include anything now)
    • Read (not possible now, should be possible)
    • Read via relations (not possible now, should be possible)
    • Read check no includes
    • Cannot CUD
  • Currencies
    • List
    • List check no includes possible (cannot include anything now)
    • Read (not possible now, should be possible)
    • Read via relations (not possible now, should be possible)
    • Read check no includes
    • Cannot CUD
  • Customers
    • Read
    • Read (with policy check)
    • Update (with policy check)
    • Read customer orders
    • Read customer orders (with policy check)
    • Read customer addresses
    • Read customer addresses (with policy check)
    • Cannot create
    • Cannot update
    • Cannot delete
  • Media
    • Read
    • List via relation (product variant, ...)
    • Cannot CUD
  • Orders
    • Read
    • Read (only with valid signature)
    • Read (with policy check)
    • Read with includes (lots of includes)
    • Update
    • Update (with policy check)
    • Order lines relation (readonly)
    • Product lines relation (readonly)
    • Digital lines relation (readonly)
    • Physical lines relation (readonly)
    • Shipping lines relation (readonly)
    • Transactions relation (readonly)
    • Create payment intent action
    • Create payment intent action (with policy check)
    • Mark pending payment action
    • Mark pending payment action (with policy check)
    • Mark awaiting payment action
    • Mark awaiting payment action (with policy check)
    • Check order status action (with policy check)
    • Cannot CD
  • OrderAddresses
    • Can be included with orders
    • Cannot CUD
  • OrderLines
    • Can be included with orders
    • Cannot CUD
  • Payments
    • Order payment cancelled (webhook, event)
    • Order payment failed (webhook, event)
    • More webhook tests
  • Prices
    • Can be included with other models
    • Cannot CUD
  • ProductAssociations
    • Read via product
    • Can be included with products
    • Can include (target., parent.)
    • Cannot CUD
  • ProductOptions
    • Read
    • ...?
  • ProductOptionValues
    • ...?
  • ProductTypes
    • ...?
  • Products
    • Read
    • Read (with 404 when not found)
    • Read (include images)
    • Read (include thumbnail)
    • Read (include product variants)
    • Read (include prices)
    • Read (include lowest price)
    • Read (show variants count)
    • Read (with draft scope check)
    • Read with includes (lots of includes)
    • List
    • List (with draft scope check)
    • List with includes (lots of includes)
    • Associations relation (readonly)
    • Inverse associations relation (readonly)
    • Brand relation (readonly)
    • Cheapest variant relation (readonly)
    • Default url relation (readonly)
    • Lowest price relation (readonly)
    • Prices relation (readonly)
    • ProductVariants relation (readonly)
    • Product filters
    • Cannot CUD
  • ProductVariants
    • Shows attributes correctly
    • Can be included via product
    • Can be included with includes (images, prices, product, product.thumbnail)
  • ShippingOptions
    • List
    • List based on country
    • Cannot CUD
  • Tags
    • List
    • List (no includes allowed)
    • Read
    • Read (with 404 when not found)
    • Read (no includes allowed)
    • Cannot CUD
  • Transactions
    • Can be included by orders
    • Cannot CRUD
    • Access via relation?
  • Urls
    • List
    • List (no includes allowed)
    • Read
    • Read (no includes allowed)
    • Cannot CUD

Extendability tests

  • Schema manifest
  • Schema extension
  • Resource manifest
  • Resource extension
  • Schemas can be added on demand
  • Schemas can be removed on demand
  • Schemas can be swapped on demand
  • Swappable requests
  • Swappable resources
  • Swappable queries
  • Swappable collection queries
  • Swappable models
  • Swappable policies
  • Swappable routes
  • Swappable actions
  • Swappable notifications

Hashids tests

  • Hashids can be configured
  • Run test suit 2x with and without hashids
@repl6669 repl6669 added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jun 15, 2023
@repl6669 repl6669 added this to the Initial release milestone Jun 15, 2023
@repl6669 repl6669 self-assigned this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant