Cypress: Verify event details section on Metrics page
djanda97 opened this issue · 1 comments
djanda97 commented
Purpose
After sending a request to the /api/track/
endpoint, verify that the event details section of the Metrics page is populated with a new event that has correct data
Test steps
- Login
- Navigate to the Settings -> Developer Settings page
- Click the "Add API Key" button
- In the "Create API Key" modal, enter text for the "API Key Name" field
- In the "Create API Key" modal, select a date for the "Expiry Date + Time" field
- In the "Create API Key" modal, click the "Confirm" button
- In the "New API Key" modal, copy the API key that is displayed
- Send a request to the
/api/track/
endpoint using the API key that was generated - Navigate to the Metrics page
- Verify that the event details section displays a new event with the following fields:
customer_id
,event_name
,ID
,time_created
- Verify fields of newly created event match the data that was supplied in the request
Notes
Cypress tests can be executed by running the npx cypress run
command inside the frontend
directory.
Function for sending HTTP requests: https://docs.cypress.io/api/commands/request
djanda97 commented
I'll work on this one