uselotus/lotus

Cypress: Verify event details section on Metrics page

djanda97 opened this issue · 1 comments

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

  1. Login
  2. Navigate to the Settings -> Developer Settings page
  3. Click the "Add API Key" button
  4. In the "Create API Key" modal, enter text for the "API Key Name" field
  5. In the "Create API Key" modal, select a date for the "Expiry Date + Time" field
  6. In the "Create API Key" modal, click the "Confirm" button
  7. In the "New API Key" modal, copy the API key that is displayed
  8. Send a request to the /api/track/ endpoint using the API key that was generated
  9. Navigate to the Metrics page
  10. Verify that the event details section displays a new event with the following fields: customer_id, event_name, ID, time_created
  11. 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

I'll work on this one