Await steps don't work properly
should_wait_at_most_until_property_equals_with_interval and should_wait_at_most_until_property_equals_with_interval_or_fail_with seems like those steps always trying to compare to the status code, not to the response body I wasn't able to make it work for me, always getting an error like: Tests in error: When the client performs GET request on "/XX/XX/XX"(Scenario: Test): lv.ctco.cukesrest.internal.ResponseFacade.doRequest Callable expected Matches successful or failure response. but was <statusCode<200>> within 5 minutes. Scenario: Test: lv.ctco.cukesrest.internal.ResponseFacade.doRequest Callable expected Matches successful or failure response. but was <statusCode<200>> within 5 minutes.
here is my example: ... And should wait at most 5 minutes with interval 30 seconds until property "XXX" equal to "YYY" When the client performs GET request on "/XX/XX/XX" Then status code is 200 ...
@IgorGursky could you please loot at this issue, maybe you can advice something?
@seraphimaTW could you share the whole test case you are running (without particular values of course - only steps sequence is of interest right now)?
The thing is that only one await condition is allowed. I.e. you cannot await both on status code and on property value. For instance if you first specified await condition for property and then specified await condition for status code then only the second one will be applied.
@sergeytrasko sure, here you are: Scenario: create a volume of specifyed size, check the metadata and delete the volume Given username "XXX" and password "XXX" And authentication type is "BASIC" And request body from file "XXX-instance.json" And content type is "application/json" When the client performs POST request on "XXX" Then status code is 200 And response contains property "id" with value "XXXX" And response contains property "status" with value "creating" And should wait at most 5 minutes with interval 30 seconds until property "XXX" equal to "YYY" When the client performs GET request on "XXX" Then status code is 200
The problem seems to be that should_wait_at_most_until_property_equals_with_interval function uses equalTo function for property matching.
When rewriten to use function equalToIgnoringType of lv.ctco.cukesrest.internal.matchers.EqualToIgnoringTypeMatcher class instead (similarly to bodyContainsPathWithValue function in lv.ctco.cukesrest.internal.AssertionFacadeImpl), it works fine.
@EduardRindtAta could you please submit PR for it?
@seraphimaTW could you please try latest version (0.0.18) that incorporates fix from @EduardRindtAta ?