Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78daf6c

Browse files
committed
[Product Review] fixed review validation when edited by admin
1 parent c4c7cdf commit 78daf6c

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

features/product/managing_product_reviews/editing_product_review.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Editing product reviews
55
I want to edit a product review
66

77
Background:
8-
Given the store has customer "Mike Ross" with email "[email protected]"
8+
Given there is a customer "Mike Ross" with an email "[email protected]" and a password "thePassword"
99
And the store has a product "Lamborghini Gallardo Model"
1010
And this product has a review titled "Awesome" and rated 4 with a comment "Nice product" added by customer "[email protected]"
1111
And I am logged in as an administrator

src/Sylius/Bundle/AdminBundle/Resources/config/services.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<import resource="services/email.xml" />
1818
<import resource="services/listener.xml" />
1919
<import resource="services/menu.xml" />
20+
<import resource="services/form.xml" />
2021
</imports>
2122

2223
<services>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
5+
This file is part of the Sylius package.
6+
7+
(c) Paweł Jędrzejewski
8+
9+
For the full copyright and license information, please view the LICENSE
10+
file that was distributed with this source code.
11+
12+
-->
13+
14+
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
15+
<parameters>
16+
<parameter key="sylius.form.type.product_review.validation_groups" type="collection">
17+
<parameter>sylius</parameter>
18+
</parameter>
19+
</parameters>
20+
</container>

src/Sylius/Bundle/ReviewBundle/Resources/config/validation/Review.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<constraint name="NotBlank">
1818
<option name="message">sylius.review.title.not_blank</option>
1919
<option name="groups">
20-
<value>sylius_review</value>
20+
<value>sylius</value>
2121
</option>
2222
</constraint>
2323
<constraint name="Length">

0 commit comments

Comments
 (0)