public function testChangeProductConfigToVariantGroups(): void
{ // main variant will be set initially
$this->
createProduct([], true
);
// update product with no main variant
$this->productRepository->
update([[ 'id' =>
$this->productId,
'variantListingConfig' =>
[ 'mainVariantId' => null,
'configuratorGroupConfig' =>
$this->
getListingConfiguration(['color', 'size'
]),
],
]],
$this->salesChannelContext->
getContext());
$listing =
$this->
fetchListing();
// all variants should be returned
static::
assertEquals(4,
$listing->
getTotal());
$variants =
$listing->
getIds();
static::
assertContains($this->variantIds
['redXl'
],
$variants);