Then the JSON response should have "propertyPath" equal to "value"

This step definition is used to verify a specific property in the JSON response and check that it equals an expected value. It supports an easy, human-readable syntax and can handle nested properties.

Then (?:the JSON response should have|the API response should have|the JSON property) "([^"]*)" (?:equal to|should be) (.+)$

 

Checks that a specific key (or nested key) in the JSON response has the expected value.