Skip to content

PropmasterPlaywright fixtures for everything behind the UI

Typed clients for APIs, databases, message brokers, caches, mobile devices and 2FA, ready to request in any Playwright test. Your existing setup stays as it is.

Propmaster logo

One import, every fixture ​

Swap the import and request what the test needs. page, request and every other Playwright fixture still work.

typescript
import { test, expect } from '@inluxc/propmaster';

test('order placed via API shows up in the database', async ({ openApiClient, databaseClient }) => {
    const { client } = openApiClient;
    const res = await (client as any).createOrder(null, { sku: 'ABC-1', quantity: 2 });
    expect(res.status).toBe(201);

    const rows = await databaseClient.query<{ status: string }>(
        'SELECT status FROM orders WHERE id = $1', [res.data.id],
    );
    expect(rows[0].status).toBe('pending');
});

Each fixture connects on first use and cleans up after the test, so a test that doesn't ask for Kafka never opens a Kafka connection.

Released under the MIT License.