Clears all events and beacons, allowing for subsequent expectations to ignore events that have been sent in the past. Example:
sendFooEvent();
await dynatraceTesting.expectToHaveSentEventTimes({ foo: "bar" }, 1);
dynatraceTesting.clearEvents();
await dynatraceTesting.expectToHaveSentEventTimes({ foo: "bar" }, 1);
Verifies that a specific event has been sent, optionally within a timeout period.
The event to check, represented as a key-value pair object. This uses Playwrights expect(event).toMatchObject.
Optionaloptions: ExpectOptionsConfiguration options for the verification
A promise that resolves when the event is confirmed to have been sent
Verifies that a specific event has been sent a specified number of times, optionally within a timeout period.
The event to check, represented as a key-value pair object. This uses Playwrights expect(event).toMatchObject.
The exact number of times the event is expected to have been sent
Optionaloptions: ExpectOptionsConfiguration options for the verification
A promise that resolves when the event is confirmed to have been sent the specified number of times
Compares captured events against a stored snapshot file. On first run, creates the snapshot. On subsequent runs, compares and fails if different. Volatile fields (timestamps, IDs, etc.) are masked by default to prevent flaky tests.
Optionaloptions: SnapshotOptionsConfiguration for snapshot comparison
Waits for a specified number of beacon requests or until a timeout occurs.
Optionaloptions: WaitForBeaconsOptionsConfiguration options for waiting for beacons
A promise that resolves with an array of beacon requests
Testing API for validating observability events and beacon requests during Playwright tests.