Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Reuse existing classes for behat test #1226

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/Behat/features/non-page-save-validation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ Feature: Blocks are validated when saving blocks on a non-page dataobject
Background:
And I add an extension "SilverStripe\FrameworkTest\Elemental\Extension\ElementContentExtension" to the "DNADesign\Elemental\Models\ElementContent" class
And I add an extension "SilverStripe\FrameworkTest\Elemental\Extension\NumericFieldExtension" to the "SilverStripe\Forms\NumericField" class
And I add an extension "SilverStripe\FrameworkTest\Elemental\Extension\MultiElementalAreasExtension" to the "SilverStripe\FrameworkTest\Model\Company" class
And a "image" "file1.jpg"
And I go to "/dev/build?flush"
And the "SilverStripe\FrameworkTest\Elemental\Model\MultiElementalBehatTestObject" "Blocks Object"
And the "SilverStripe\FrameworkTest\Model\Company" "Blocks Object"
And the "group" "EDITOR" has permissions "Access to 'Pages' section"
And I am logged in as a member of "EDITOR" group
And I go to "/admin/multi-elemental-behat-test-admin"
And I go to "/admin/test"
And I click "Blocks Object" in the ".ss-gridfield-items" element

Scenario: Validation when parent saving inline blocks
Expand Down Expand Up @@ -84,6 +85,6 @@ Feature: Blocks are validated when saving blocks on a non-page dataobject
# Now should see 2x success toast messages, one for the block, the other for the parent object
Then I should see a "Saved 'Valid block one' successfully" success toast
When I click on the ".toast__close" element
Then I should see a "Saved Multi Elemental Behat Test Object "Blocks Object" successfully." success toast
Then I should see a "Saved Company "Blocks Object" successfully." success toast
When I click on the ".toast__close" element
Then I should not see a ".toast__close" element
Loading