Skip to content

Commit

Permalink
[Content][Core] Behat fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Aug 9, 2016
1 parent d3e9b97 commit 4ef6552
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 45 deletions.
2 changes: 1 addition & 1 deletion src/Sylius/Behat/Page/Shop/Product/ShowPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function hasAttributeWithValue($name, $value)

$row = $nameTd->getParent();

return $value === $row->find('css', 'td.sylius-product-attribute-value')->getText();
return $value === trim($row->find('css', 'td.sylius-product-attribute-value')->getText());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
use Sylius\Bundle\ContentBundle\Doctrine\ODM\PHPCR\StaticContentRepository;
use Sylius\Bundle\ContentBundle\Document\ActionBlock;
use Sylius\Bundle\ContentBundle\Document\ImagineBlock;
use Sylius\Bundle\ContentBundle\Document\Menu;
use Sylius\Bundle\ContentBundle\Document\MenuBlock;
use Sylius\Bundle\ContentBundle\Document\MenuNode;
use Sylius\Bundle\ContentBundle\Document\RedirectRoute;
use Sylius\Bundle\ContentBundle\Document\ReferenceBlock;
use Sylius\Bundle\ContentBundle\Document\Route;
Expand All @@ -26,9 +23,6 @@
use Sylius\Bundle\ContentBundle\Document\StringBlock;
use Sylius\Bundle\ContentBundle\Form\Type\ActionBlockType;
use Sylius\Bundle\ContentBundle\Form\Type\ImagineBlockType;
use Sylius\Bundle\ContentBundle\Form\Type\MenuBlockType;
use Sylius\Bundle\ContentBundle\Form\Type\MenuNodeType;
use Sylius\Bundle\ContentBundle\Form\Type\MenuType;
use Sylius\Bundle\ContentBundle\Form\Type\RedirectRouteType;
use Sylius\Bundle\ContentBundle\Form\Type\ReferenceBlockType;
use Sylius\Bundle\ContentBundle\Form\Type\RouteType;
Expand Down
10 changes: 0 additions & 10 deletions src/Sylius/Bundle/ContentBundle/Form/Type/StaticContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Simple static content type.
*
* @author Paweł Jędrzejewski <pawel@sylius.org>
*/
class StaticContentType extends AbstractResourceType
Expand Down Expand Up @@ -51,14 +49,6 @@ public function buildForm(FormBuilderInterface $builder, array $options = [])
'label' => 'sylius.form.static_content.routes',
'cascade_validation' => true,
])
->add('menuNodes', 'collection', [
'type' => 'sylius_menu_node',
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
'label' => 'sylius.form.static_content.menu_nodes',
'cascade_validation' => true,
])
->add('body', 'textarea', [
'required' => false,
'label' => 'sylius.form.static_content.body',
Expand Down
27 changes: 0 additions & 27 deletions src/Sylius/Bundle/ContentBundle/Resources/config/validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,33 +82,6 @@
</property>
</class>

<class name="Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode">
<property name="name">
<constraint name="NotBlank">
<option name="message">sylius.menu_node.name.not_blank</option>
<option name="groups">sylius</option>
</constraint>
</property>
<property name="label">
<constraint name="NotBlank">
<option name="message">sylius.menu_node.label.not_blank</option>
<option name="groups">sylius</option>
</constraint>
</property>
<property name="publishStartDate">
<constraint name="DateTime">
<option name="message">sylius.menu_node.start_date.invalid_date</option>
<option name="groups">sylius</option>
</constraint>
</property>
<property name="publishEndDate">
<constraint name="DateTime">
<option name="message">sylius.menu_node.end_date.invalid_date</option>
<option name="groups">sylius</option>
</constraint>
</property>
</class>

<class name="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route">
<property name="name">
<constraint name="NotBlank">
Expand Down
1 change: 0 additions & 1 deletion src/Sylius/Bundle/ContentBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"symfony-cmf/content-bundle": "~1.2",
"symfony-cmf/create-bundle": "~1.2",
"symfony-cmf/media-bundle": "~1.2",
"symfony-cmf/menu-bundle": "~1.2",
"symfony-cmf/routing-bundle": "~1.2"
},
"require-dev": {
Expand Down

0 comments on commit 4ef6552

Please sign in to comment.