Class FacetDrillDownTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
-
- de.hybris.platform.solrfacetsearch.integration.FacetDrillDownTest
-
- All Implemented Interfaces:
JaloSessionHolder
public class FacetDrillDownTest extends AbstractIntegrationTest
Tests the drill down of facets, i.e. for each selected facet value the remaining facet count should be reduced. This also should work
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
DEFAULT_ENCODING, expectedException, FACET_SEARCH_CONFIG_NAME, HW_CATALOG, ONLINE_CATALOG_VERSION, PRODUCT_CODE, SOLR_SERVER_CLOUD_ENDPOINT, SOLR_SERVER_MODE, SOLR_SERVER_STANDALONE_ENDPOINT, STAGED_CATALOG_VERSION
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description FacetDrillDownTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<ProductModel>checkProductCollection(CatalogVersionModel catalogVersion, java.util.Collection<? extends ItemModel> items)protected booleanisSuperCategory(CategoryModel category, java.lang.String categoryName)protected booleanisSuperCategory(ProductModel product, java.lang.String categoryName)protected voidloadData()voidtestFacetDrillDown()Given products with manufacturerName = "Intel", categoryName = "Motherboards_online_de" in language de, in hwcatalog and with a certain facet count and with hwcatalog selected
and with facet value manufacturerName set "Intel"
and with facet value categoryName set to "Motherboards_online_de"
then a search yields products only with manufacturerName = "Intel" and the facet count reduced to reflect this, with the facet count lower when the second facet is selectedvoidtestFacetLocalized()Given products with categoryName = "Motherboards_online_de" in hwcatalog and language de and with a certain facet count
and with hwcatalog selected
and with language de selected
and with facet value categoryName set to "Motherboards_online_de"
then a search yields products only with categoryName = "Motherboards_online_de" and the facet count reduced to reflect thisvoidtestFacetNonLocalized()Given products with manufacturerName = "Intel" in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet value manufacturerName set to "Intel"
then a search yields products only with manufacturerName =and the facet count reduced to reflect this voidtestFacetWithSearch()Given product in a price range = "101-200" and "graphics" in description, residing in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet price set to "101-200"
then when searching in description for the string "graphics" the the resulting products must be in the specified price range and and the facet count must be reduced to reflect thisvoidtestRangedFacet()Given product in a price range = "101-200" in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet price set to "101-200" then the the resulting products must be in the specified price range and the facet count mustbe reduced to reflect this-
Methods inherited from class de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
beforeLoadData, getFacetSearchConfig, getFacetSearchConfigName, getIndexedTypeModel, getProductCode, getSolrFacetSearchConfigModel, getTestId, importConfig, importConfig, initializeIndexedType, readFile, setUp, tearDown
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
loadData
protected void loadData() throws java.lang.Exception- Overrides:
loadDatain classAbstractIntegrationTest- Throws:
java.lang.Exception
-
testFacetNonLocalized
public void testFacetNonLocalized() throws java.lang.ExceptionGiven products with manufacturerName = "Intel" in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet value manufacturerName set to "Intel"
then a search yields products only with manufacturerName =and the facet count reduced to reflect this - Throws:
java.lang.Exception
-
testFacetLocalized
public void testFacetLocalized() throws java.lang.ExceptionGiven products with categoryName = "Motherboards_online_de" in hwcatalog and language de and with a certain facet count
and with hwcatalog selected
and with language de selected
and with facet value categoryName set to "Motherboards_online_de"
then a search yields products only with categoryName = "Motherboards_online_de" and the facet count reduced to reflect this- Throws:
java.lang.Exception
-
testFacetWithSearch
public void testFacetWithSearch() throws java.lang.ExceptionGiven product in a price range = "101-200" and "graphics" in description, residing in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet price set to "101-200"
then when searching in description for the string "graphics" the the resulting products must be in the specified price range and and the facet count must be reduced to reflect this- Throws:
java.lang.Exception
-
testRangedFacet
public void testRangedFacet() throws java.lang.ExceptionGiven product in a price range = "101-200" in hwcatalog and with a certain facet count
and with hwcatalog selected
and with facet price set to "101-200" then the the resulting products must be in the specified price range and the facet count mustbe reduced to reflect this- Throws:
java.lang.Exception
-
testFacetDrillDown
public void testFacetDrillDown() throws java.lang.ExceptionGiven products with manufacturerName = "Intel", categoryName = "Motherboards_online_de" in language de, in hwcatalog and with a certain facet count and with hwcatalog selected
and with facet value manufacturerName set "Intel"
and with facet value categoryName set to "Motherboards_online_de"
then a search yields products only with manufacturerName = "Intel" and the facet count reduced to reflect this, with the facet count lower when the second facet is selected- Throws:
java.lang.Exception
-
isSuperCategory
protected boolean isSuperCategory(ProductModel product, java.lang.String categoryName)
-
isSuperCategory
protected boolean isSuperCategory(CategoryModel category, java.lang.String categoryName)
-
checkProductCollection
protected java.util.Collection<ProductModel> checkProductCollection(CatalogVersionModel catalogVersion, java.util.Collection<? extends ItemModel> items)
-
-