Releases: elbformat/symfony-behat-bundle
v1.5.7 - Array Support in AbstractDatabaseContext
v1.5.6 - Command Inputs
- Feature: Testing with command inputs
v1.5.5 - Fixed AbstractApiContext
Bugfix: Documentation and service definition for MockClientCallback to test APIs
v1.5.4
v1.5.3
v1.5.2 Fix logger
Fix TestLogger to be compatible with symfony 5.4.
v1.5.1
v1.5.0 - Major restructuring and features
v1.5.0
In this version there changed a lot under the hood, but the usage for existing things stays the same.
Restructuring BrowserContext
As the BrowserContext was getting more and more complex, it is now split into 4 Contexts, sharing the state:
- HttpContext - Basic request/response operations, including headers and redirects
- HtmlContext - Querying the DOM for Text/HTML
- FromContext - Testing, manipulating and submitting forms
- JsonContext - Json response checks for custom APIs
Switching LoggingContext
The LoggingContext was formerly bound to monolog, which is not required in newer symfony applications.
Instead, we now have a PSR-compatible TestLogger that catches the logs and can be queried in behat.
Improvements to HttpContext
- Allow adding HTTP headers to
When I send ... request to ...
- Allow non-rfc conform redirects with path instead of URL
- Allow testing for path only in redirect check
Improvements to HtmlContext
When I remove attribute ... from ...
to unhide elementsThen I see ... before ...
to check sortings.- TODO: Not found tags are not shown with full content, but only the tag
Improvements to FormContext
When I submit the form with button ...
to distinguish the submit buttonWhen I clear field ...
to remove data from a fieldWhen I check ... checkbox with value ...
to distinguish between multi-optionsWhen I uncheck ... checkbox
to revert checkingWhen I add an input field ...
to add dynamic collection fieldsWhen I remove an input field ...
to remove dynamic collection fieldsWhen I remove a select field ...
to remove dynamic collection fieldsThen the form contains a select
to check for options in selectsThen select ... contains option
to check for options in selectsThen select ... does not contain option
to check for options in selects- TODO: file upload
Improvements in AbstractDatabaseContext
assertObject
returns the found object to allow steps to be built upon the results.- Support for constructor arguments, including defaults defined in the context.
assertCollectionDoesNotContain
helps negation of collection check- Support creating m:n relations by adding a
$reverseRelationName
parameter.
Added DateContext
Based on ClockMock and the uopz extension, the context allows you to change the current date inside your tests.
Added MailerContext in favour of SwiftmailerContext
As Swiftmailer is deprecated in favour of the symfony mailer, we adapted the context as well.
Added AbstractApiContext
This context will help you build your own API context, like the AbstractDatabaseContext