Skip to content

Commit 36ae29a

Browse files
committed
[Studio] fix behat tests
1 parent 354a3da commit 36ae29a

File tree

24 files changed

+77
-80
lines changed

24 files changed

+77
-80
lines changed

src/CoreShop/Bundle/AddressBundle/Form/Type/CountryChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
use CoreShop\Component\Address\Model\CountryInterface;
2121
use CoreShop\Component\Resource\Repository\RepositoryInterface;
22-
use CoreShop\Bundle\ResourceBundle\Form\DataTransformer\CollectionToArrayTransformer;
22+
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
2323
use Symfony\Component\Form\AbstractType;
2424
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
2525
use Symfony\Component\Form\FormBuilderInterface;

src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
use CoreShop\Component\Address\Model\ZoneInterface;
2121
use CoreShop\Component\Resource\Repository\RepositoryInterface;
22-
use CoreShop\Bundle\ResourceBundle\Form\DataTransformer\CollectionToArrayTransformer;
22+
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
2323
use Symfony\Component\Form\AbstractType;
2424
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
2525
use Symfony\Component\Form\FormBuilderInterface;

src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CarriersConfigurationType.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace CoreShop\Bundle\CoreBundle\Form\Type\Rule\Condition;
1919

20-
use CoreShop\Bundle\ShippingBundle\Form\Type\CarrierChoiceType;
2120
use Symfony\Component\Form\AbstractType;
21+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
2222
use Symfony\Component\Form\FormBuilderInterface;
2323

2424
final class CarriersConfigurationType extends AbstractType
2525
{
2626
public function buildForm(FormBuilderInterface $builder, array $options): void
2727
{
2828
$builder
29-
->add('carriers', CarrierChoiceType::class, [
29+
->add('carriers', CollectionType::class, [
3030
'label' => 'coreshop_condition_carriers',
31-
'multiple' => true,
31+
'allow_add' => true,
32+
'allow_delete' => true,
33+
'block_prefix' => 'coreshop_carrier_choice',
3234
])
3335
;
3436
}

src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CountriesConfigurationType.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace CoreShop\Bundle\CoreBundle\Form\Type\Rule\Condition;
1919

20-
use CoreShop\Bundle\AddressBundle\Form\Type\CountryChoiceType;
2120
use Symfony\Component\Form\AbstractType;
21+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
2222
use Symfony\Component\Form\FormBuilderInterface;
2323

2424
final class CountriesConfigurationType extends AbstractType
2525
{
2626
public function buildForm(FormBuilderInterface $builder, array $options): void
2727
{
2828
$builder
29-
->add('countries', CountryChoiceType::class, [
29+
->add('countries', CollectionType::class, [
3030
'label' => 'coreshop_condition_countries',
31-
'multiple' => true,
31+
'allow_add' => true,
32+
'allow_delete' => true,
33+
'block_prefix' => 'coreshop_country_choice',
3234
])
3335
;
3436
}

src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CurrenciesConfigurationType.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace CoreShop\Bundle\CoreBundle\Form\Type\Rule\Condition;
1919

20-
use CoreShop\Bundle\CurrencyBundle\Form\Type\CurrencyChoiceType;
2120
use Symfony\Component\Form\AbstractType;
21+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
2222
use Symfony\Component\Form\FormBuilderInterface;
2323

2424
final class CurrenciesConfigurationType extends AbstractType
2525
{
2626
public function buildForm(FormBuilderInterface $builder, array $options): void
2727
{
2828
$builder
29-
->add('currencies', CurrencyChoiceType::class, [
29+
->add('currencies', CollectionType::class, [
3030
'label' => 'coreshop_condition_currencies',
31-
'multiple' => true,
31+
'allow_add' => true,
32+
'allow_delete' => true,
33+
'block_prefix' => 'coreshop_currency_choice',
3234
])
3335
;
3436
}

src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/StoresConfigurationType.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace CoreShop\Bundle\CoreBundle\Form\Type\Rule\Condition;
1919

20-
use CoreShop\Bundle\StoreBundle\Form\Type\StoreChoiceType;
2120
use Symfony\Component\Form\AbstractType;
21+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
2222
use Symfony\Component\Form\FormBuilderInterface;
2323

2424
final class StoresConfigurationType extends AbstractType
2525
{
2626
public function buildForm(FormBuilderInterface $builder, array $options): void
2727
{
2828
$builder
29-
->add('stores', StoreChoiceType::class, [
29+
->add('stores', CollectionType::class, [
3030
'label' => 'coreshop_condition_stores',
31-
'multiple' => true,
31+
'allow_add' => true,
32+
'allow_delete' => true,
33+
'block_prefix' => 'coreshop_store_choice',
3234
])
3335
;
3436
}

src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ZonesConfigurationType.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace CoreShop\Bundle\CoreBundle\Form\Type\Rule\Condition;
1919

20-
use CoreShop\Bundle\AddressBundle\Form\Type\ZoneChoiceType;
2120
use Symfony\Component\Form\AbstractType;
21+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
2222
use Symfony\Component\Form\FormBuilderInterface;
2323

2424
final class ZonesConfigurationType extends AbstractType
2525
{
2626
public function buildForm(FormBuilderInterface $builder, array $options): void
2727
{
2828
$builder
29-
->add('zones', ZoneChoiceType::class, [
29+
->add('zones', CollectionType::class, [
3030
'label' => 'coreshop_condition_zones',
31-
'multiple' => true,
31+
'allow_add' => true,
32+
'allow_delete' => true,
33+
'block_prefix' => 'coreshop_zone_choice',
3234
])
3335
;
3436
}

src/CoreShop/Bundle/CoreBundle/Resources/assets/pimcore-studio/src/modules/customer-company-assignment/CustomerCompanyAssignmentWidgetRestorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const SUPPORTED_COMPONENTS = [
2525
export class CustomerCompanyAssignmentWidgetRestorer implements WidgetRestorer {
2626
supports(config: WidgetManagerTabConfig): boolean {
2727
return (
28-
SUPPORTED_COMPONENTS.includes(config.component) &&
28+
config.component !== undefined && SUPPORTED_COMPONENTS.includes(config.component) &&
2929
typeof config.config?.customerId === 'number'
3030
)
3131
}

src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace CoreShop\Bundle\CurrencyBundle\Form\Type;
1919

2020
use CoreShop\Component\Resource\Repository\RepositoryInterface;
21-
use CoreShop\Bundle\ResourceBundle\Form\DataTransformer\CollectionToArrayTransformer;
21+
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
2222
use Symfony\Component\Form\AbstractType;
2323
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
2424
use Symfony\Component\Form\FormBuilderInterface;

src/CoreShop/Bundle/IndexBundle/Resources/assets/pimcore-studio/src/modules/shared/QuantityUnitSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const QuantityUnitSelect: React.FC<QuantityUnitSelectProps> = (props) =>
119119
placeholder={props.placeholder ?? 'Select quantity unit'}
120120
showSearch
121121
filterOption={(input, option) =>
122-
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
122+
String(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
123123
}
124124
/>
125125
)

0 commit comments

Comments
 (0)