Playwright Cucumber TS Steps
    Preparing search index...

    Function mockApiWithInlineJson

    • Mocks a specific API endpoint with a hardcoded inline JSON response body. Supports fixtures for reusable API endpoints.

      Parameters

      • page: any
      • urlPatternKey: string
      • jsonBody: string

      Returns Promise<void>

      Given I pw mock the API endpoint "/api/users" with body '{"id": 1, "name": "Fake"}'