Problem Description
Validating playbook changes currently requires running the full end-to-end integration tests, which require databases, backends, and long execution times (3-7 minutes).
Proposed Solution
Expose a unit-testing harness that executes plays against static mock HTML strings or local templates:
import { testPlay } from '@rickcedwhat/playwright-sugar/test-utils';
test('branches correctly on readOnly page state', async () => {
const mockHtml = '<button disabled>Save</button>';
const result = await testPlay(projectPb.update, mockHtml);
expect(result.outcome).toBe('readOnly');
});
This enables playbooks to be unit-tested in milliseconds.
Problem Description
Validating playbook changes currently requires running the full end-to-end integration tests, which require databases, backends, and long execution times (3-7 minutes).
Proposed Solution
Expose a unit-testing harness that executes plays against static mock HTML strings or local templates:
This enables playbooks to be unit-tested in milliseconds.