Playwright Cucumber TS Steps
    Preparing search index...

    Function mockApiStatus

    • Mocks an API endpoint to return a specific HTTP status code only. Useful for simulating server errors like 500 or 404. Supports fixtures for reusable API endpoints.

      Parameters

      • page: any
      • urlPatternKey: string
      • statusCode: number

      Returns Promise<void>

      Given I pw mock the API endpoint "/api/broken" with status 500