Difficulty: 6/10cy.intercept, request payload validation, custom commandscy.intercept() lets you:1Intercepts the POST /api/login request and assigns an alias.2Submits a login form.3Waits for the request and checks the request body to verify it includes the right username.You’re testing that the frontend sends the correct data to the backend (e.g., login, form submissions, filters, etc.)CopyScenario Questions0-2 years experience1You have a form that submits JSON to /api/login. How would you write a Cypress test to verify that the request body contains the correct email and password fields?2If the request payload is sent as form-data instead of JSON, what changes would you make to your Cypress assertion?2-5 years experience1During a recent sprint, a test that asserts the request payload started failing after the backend switched to snake_case keys. How would you update your Cypress intercept and assertion to handle this change?Follow-up QuestionsWhat would you do if the request body is sent as a stringified JSON?How do you ensure your assertions stay in sync with backend contract changes?Can you explain the trade‑offs between stubbing the response versus letting the request hit a real service when asserting payloads?Suggest Improvement