\SWS_ProductTest
Testing {@link Product} attributes and options on product pages.
Summary of tests:
-----------------
delete product, is unpublished, versions still exist
new version of product created when amount changed
variations disabled when new attribute added
correct options for variations returned on product page on first dropdown
cannot save negative amount for product variation
TODO
----
add new variation
add product to parent page, check URL works
add product to multiple categories, check that it appears on each
disable all variations, product should be unpublished
try saving product with 'action_publish' passed as a Get var, when no enabled variations exist product should not be published
add product to cart, stock depletes latest version of product
add variation to cart, stock depletes latest version of variation
remove product from cart, stock replenishes latest version of product
remote variation from cart, stock replenishes latest version of variation
scheduled task deletes order and associated objects, replenishes stock
- Author: Frank Mullenger <frankmullenger@gmail.com>
- Copyright: Copyright (c) 2011, Frank Mullenger
Synopsis
- // members
- protected static boolean $use_draft_site = true;
- // methods
- public void setUp()
- public void testDeleteProduct()
- public void testChangeProductAmount()
- public void testVariationsRemainEnabledAfterAttributeWrite()
- public void testVariationsDisabledAfterAttributeAdded()
- public void testProductOptionsFirstSet()
- public void testNegativeVariationPrice()
Hierarchy
Extends
- SWS_Test
Members
protected
- $use_draft_site
Methods
public
- setUp()
- testChangeProductAmount() — Try to publish a product with amount changed
- testDeleteProduct() — Try to delete a product, make sure it is unpublished but that versions remain the same
- testNegativeVariationPrice() — Try to save a Variation with a negative price difference
- testProductOptionsFirstSet() — Load the project page and test the first select for correct product options
- testVariationsDisabledAfterAttributeAdded() — Try adding a new attribute to a product, existing variations that do not have an option set for the new attribute should be disabled
- testVariationsRemainEnabledAfterAttributeWrite() — Try writing Attribute for a product, make sure variations remain enabled