You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And a "page" "Blocks Page" with a "Alice's Block" content element with "original content" content # DNADesign\Elemental\Tests\Behat\Context\FixtureContext::theHasAContentElementWithContent()
Page is invalid (SilverStripe\ORM\ValidationException)
Basically, the configuration that applies ValidationFailedExtension to Page in the previous scenario either isn't being removed or a flush isn't being conducted after it is removed. This is a change from CMS 4 where that test passes fine.
In SilverStripe\BehatExtension\Context\FixtureContext::iAddAnExtensionToTheClass(), the extension is added to the context running in the browser by adding a file to _config, which gets cleared out after the scenario ends - but the extension is also added to the context running the tests via ::add_extension(), which was not being cleared.
This was fine in the past, because features that would have been affected were in one of two camps:
Weren't adding an extension in a scenario - only in a background
Fixtures were being created in the browser context or in a way that didn't trigger errors from extensions
This change swapped the context for the creation of SiteTree records in elemental features. This caused the new validation failed extension from silverstripe/silverstripe-elemental#930 to cause an error when a new SiteTree record was created.
We just need to clear the extensions from the test context after each scenario.
dnadesign/silverstripe-elemental
https://github.com/silverstripe/silverstripe-elemental/actions/runs/4997726484/jobs/8952788887
Basically, the configuration that applies
ValidationFailedExtension
toPage
in the previous scenario either isn't being removed or a flush isn't being conducted after it is removed. This is a change from CMS 4 where that test passes fine.Tag the module after this is fixed.
PR
The text was updated successfully, but these errors were encountered: