Skip to content

Commit

Permalink
OP-321: Behat fix and block name vlaidator
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jun 25, 2024
1 parent 5132848 commit f5368fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion features/admin/managing_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Feature: Managing cms blocks
Scenario: Updating block
Given there is a block with "store_phone_number" code
When I go to the update "store_phone_number" block page
And I fill the content with "987654321"
And I update it
Then I should be notified that the block has been successfully updated

Expand Down
17 changes: 17 additions & 0 deletions src/Resources/config/validation/Block.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,22 @@
</option>
</constraint>
</property>

<property name="name">
<constraint name="NotBlank">
<option name="groups">
<value>bitbag</value>
</option>
</constraint>
<constraint name="Length">
<option name="min">2</option>
<option name="max">250</option>
<option name="minMessage">bitbag_sylius_cms_plugin.block.name.min_length</option>
<option name="maxMessage">bitbag_sylius_cms_plugin.block.name.max_length</option>
<option name="groups">
<value>bitbag</value>
</option>
</constraint>
</property>
</class>
</constraint-mapping>

0 comments on commit f5368fe

Please sign in to comment.