Skip to Content
Quality AssuranceTestsIntegrationsSuiteIdentifier Trait Test Suite Documentation

Identifier Trait Test Suite Documentation

Overview

This Jest test suite validates the presence of essential identification traits within the API responses for all entities defined in the metadata-cache.json. It ensures that fundamental fields like unique identifiers and shortcodes are consistently provided by the API.

Test Scope

  • Iterates over all entities defined in the metadata cache.
  • For each entity, it performs a GET request to the listing and detail endpoints.
  • It verifies that the following fields are present in both the listing and detail responses:
    • id
    • shortcode
    • uniqueId

Environmental Setup

  • Uses environment variable:
    • PHPR_BASE_URL - Base URL for API requests.
  • Loads entity information from metadata-cache.json.

Notes

  • These tests ensure that entities can be correctly identified and referenced in the frontend or by other services.
  • The inclusion of shortcode and uniqueId ensures consistency across different view types.
Last updated on