This step definition is used to verify that the API response body contains a specific text or value. It helps ensure that the response includes expected content, whether it’s a string message or a value in JSON.
Then (?:the )?API response should contain "([^"]*)"$
Checks if the response from the last API request includes the given text.
Example #1: Then the API response should contain "success"
Example #2: Then API response should contain "John Doe"