Skip to content

Commit cede293

Browse files
committed
Fix test ProductsTest.testGetProductFilters
1 parent 227005c commit cede293

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

src/test/kotlin/com/ecwid/apiclient/v3/entity/BaseEntityTest.kt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import com.ecwid.apiclient.v3.dto.product.result.ProductsSearchResult
2828
import com.ecwid.apiclient.v3.dto.producttype.request.ProductTypeDeleteRequest
2929
import com.ecwid.apiclient.v3.dto.producttype.request.ProductTypesGetAllRequest
3030
import com.ecwid.apiclient.v3.dto.producttype.result.FetchedProductType
31+
import com.ecwid.apiclient.v3.dto.profile.enums.ProductFilterType
3132
import com.ecwid.apiclient.v3.dto.profile.request.StoreProfileUpdateRequest
3233
import com.ecwid.apiclient.v3.dto.profile.request.UpdatedStoreProfile
3334
import com.ecwid.apiclient.v3.dto.variation.request.DeleteAllProductVariationsRequest
@@ -83,6 +84,46 @@ abstract class BaseEntityTest {
8384
automaticTaxEnabled = false,
8485
taxes = listOf(),
8586
pricesIncludeTax = false
87+
),
88+
productFiltersSettings = UpdatedStoreProfile.ProductFiltersSettings(
89+
enabledInStorefront = true,
90+
filterSections = listOf(
91+
UpdatedStoreProfile.ProductFilterItem(
92+
type = ProductFilterType.PRICE,
93+
enabled = false,
94+
),
95+
UpdatedStoreProfile.ProductFilterItem(
96+
type = ProductFilterType.IN_STOCK,
97+
enabled = true,
98+
),
99+
UpdatedStoreProfile.ProductFilterItem(
100+
type = ProductFilterType.ON_SALE,
101+
enabled = true,
102+
),
103+
UpdatedStoreProfile.ProductFilterItem(
104+
type = ProductFilterType.CATEGORIES,
105+
enabled = false,
106+
),
107+
UpdatedStoreProfile.ProductFilterItem(
108+
type = ProductFilterType.SEARCH,
109+
enabled = true,
110+
),
111+
UpdatedStoreProfile.ProductFilterItem(
112+
name = "Color",
113+
type = ProductFilterType.OPTION,
114+
enabled = true,
115+
),
116+
UpdatedStoreProfile.ProductFilterItem(
117+
name = "Brand",
118+
type = ProductFilterType.ATTRIBUTE,
119+
enabled = true,
120+
),
121+
UpdatedStoreProfile.ProductFilterItem(
122+
name = "UPC",
123+
type = ProductFilterType.ATTRIBUTE,
124+
enabled = true,
125+
),
126+
),
86127
)
87128
)
88129

0 commit comments

Comments
 (0)