Class ShoppingCart
- java.lang.Object
-
- com.adobe.cq.testing.client.components.AbstractComponent
-
- com.adobe.cq.testing.client.components.commerce.ShoppingCart
-
public class ShoppingCart extends AbstractComponent
Wraps the shopping cart component, providing methods for editing it. See/libs/commerce/components/shoppingcartin the repository for implementation details.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROP_EMPTY_MESSAGEstatic StringPROP_PRICE_LABELstatic StringPROP_PRODUCT_LABELstatic StringPROP_QUANTITY_LABELstatic StringPROP_READONLYstatic StringPROP_THUMBNAILSstatic StringRESOURCE_TYPE-
Fields inherited from class com.adobe.cq.testing.client.components.AbstractComponent
changeProperties, client, componentPath, DEFAULT_LOCATION, jsonNode, location, pagePath
-
-
Constructor Summary
Constructors Constructor Description ShoppingCart(ComponentClient client, String pagePath, String location, String nameHint)The constructor stores all the component path information like parentPage, name etc.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetResourceType()The resource type for the component, e.g.-
Methods inherited from class com.adobe.cq.testing.client.components.AbstractComponent
create, getClient, getComponentNode, getComponentPath, getCreateFormEntity, getFirstChild, getLocation, getName, getNext, getNextNodePath, getPagePath, getParentPath, getPrevious, getPreviousNodePath, getProperty, getPropertyAsString, getPropertyAsStringArray, reorder, save, setProperty, setProperty
-
-
-
-
Field Detail
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
PROP_PRODUCT_LABEL
public static final String PROP_PRODUCT_LABEL
- See Also:
- Constant Field Values
-
PROP_THUMBNAILS
public static final String PROP_THUMBNAILS
- See Also:
- Constant Field Values
-
PROP_QUANTITY_LABEL
public static final String PROP_QUANTITY_LABEL
- See Also:
- Constant Field Values
-
PROP_PRICE_LABEL
public static final String PROP_PRICE_LABEL
- See Also:
- Constant Field Values
-
PROP_READONLY
public static final String PROP_READONLY
- See Also:
- Constant Field Values
-
PROP_EMPTY_MESSAGE
public static final String PROP_EMPTY_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShoppingCart
public ShoppingCart(ComponentClient client, String pagePath, String location, String nameHint) throws org.apache.sling.testing.clients.ClientException
The constructor stores all the component path information like parentPage, name etc.- Parameters:
client- TheFoundationClientthat's creating this instance.pagePath- path to the page that will contain the component.location- relative location to the parent node inside the page that will contain the component node.nameHint- name to be used for the component node. Might get altered by the server if a naming conflict occurs. TheAbstractComponent.getName()method will return the correct name afterAbstractComponent.create(String, int...)has been called.- Throws:
org.apache.sling.testing.clients.ClientException- if the request fails
-
-
Method Detail
-
getResourceType
public String getResourceType()
Description copied from class:AbstractComponentThe resource type for the component, e.g. foundation/components/text. this will be set in thesling:resourceTypeproperty of the node.- Specified by:
getResourceTypein classAbstractComponent- Returns:
- the resource type
-
-