API accepts a JSON payload (Cypress)
Generated output
Section titled “Generated output”### ✅ API accepts a JSON payload
- **Given** the client has the following JSON payload **Payload** ```json { "password": "secret", "rememberMe": true } ```- **When** the client sends the request- **Then** the response status should be 200- **And** the response body should include "token"Cypress code
Section titled “Cypress code”import { story } from 'executable-stories-cypress';
describe('API', () => { it('API accepts a JSON payload', () => { story.init(); story.given('the client has the following JSON payload'); story.json({ label: 'Payload', value: { password: 'secret', rememberMe: true, }, }); story.when('the client sends the request'); story.then('the response status should be 200'); story.then('the response body should include "token"'); });});