|
@@ -1,14 +1,30 @@
|
|
|
-import * as BreadcrumbFrameData from 'sentry-fixture/replay/replayBreadcrumbFrameData';
|
|
|
-import * as ReplayFrameEvents from 'sentry-fixture/replay/replayFrameEvents';
|
|
|
-import * as ReplaySpanFrameData from 'sentry-fixture/replay/replaySpanFrameData';
|
|
|
+import {
|
|
|
+ ReplayClickFrameFixture,
|
|
|
+ ReplayConsoleFrameFixture,
|
|
|
+ ReplaySlowClickFrameFixture,
|
|
|
+} from 'sentry-fixture/replay/replayBreadcrumbFrameData';
|
|
|
+import {
|
|
|
+ ReplayBreadcrumbFrameEventFixture,
|
|
|
+ ReplaySpanFrameEventFixture,
|
|
|
+} from 'sentry-fixture/replay/replayFrameEvents';
|
|
|
+import {
|
|
|
+ ReplayMemoryFrameFixture,
|
|
|
+ ReplayNavigationFrameFixture,
|
|
|
+} from 'sentry-fixture/replay/replaySpanFrameData';
|
|
|
|
|
|
import {SlowClickFrame} from 'sentry/utils/replays/types';
|
|
|
|
|
|
-export function ConsoleEvent({timestamp, message}: {timestamp: Date; message?: string}) {
|
|
|
- return ReplayFrameEvents.BreadcrumbFrameEvent({
|
|
|
+export function ReplayConsoleEventFixture({
|
|
|
+ timestamp,
|
|
|
+ message,
|
|
|
+}: {
|
|
|
+ timestamp: Date;
|
|
|
+ message?: string;
|
|
|
+}) {
|
|
|
+ return ReplayBreadcrumbFrameEventFixture({
|
|
|
timestamp,
|
|
|
data: {
|
|
|
- payload: BreadcrumbFrameData.ConsoleFrame({
|
|
|
+ payload: ReplayConsoleFrameFixture({
|
|
|
timestamp,
|
|
|
message: message ?? 'Hello World',
|
|
|
}),
|
|
@@ -16,11 +32,11 @@ export function ConsoleEvent({timestamp, message}: {timestamp: Date; message?: s
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-export function ClickEvent({timestamp}: {timestamp: Date}) {
|
|
|
- return ReplayFrameEvents.BreadcrumbFrameEvent({
|
|
|
+export function ReplayClickEventFixture({timestamp}: {timestamp: Date}) {
|
|
|
+ return ReplayBreadcrumbFrameEventFixture({
|
|
|
timestamp,
|
|
|
data: {
|
|
|
- payload: BreadcrumbFrameData.ClickFrame({
|
|
|
+ payload: ReplayClickFrameFixture({
|
|
|
timestamp,
|
|
|
message: 'nav[aria-label="Primary Navigation"] > div > a#sidebar-item-projects',
|
|
|
data: {
|
|
@@ -31,11 +47,11 @@ export function ClickEvent({timestamp}: {timestamp: Date}) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-export function DeadClickEvent({timestamp}: {timestamp: Date}) {
|
|
|
- return ReplayFrameEvents.BreadcrumbFrameEvent({
|
|
|
+export function ReplayDeadClickEventFixture({timestamp}: {timestamp: Date}) {
|
|
|
+ return ReplayBreadcrumbFrameEventFixture({
|
|
|
timestamp,
|
|
|
data: {
|
|
|
- payload: BreadcrumbFrameData.SlowClickFrame({
|
|
|
+ payload: ReplaySlowClickFrameFixture({
|
|
|
timestamp,
|
|
|
message: 'nav[aria-label="Primary Navigation"] > div > a#sidebar-item-projects',
|
|
|
data: {
|
|
@@ -52,7 +68,7 @@ export function DeadClickEvent({timestamp}: {timestamp: Date}) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-export function NavigateEvent({
|
|
|
+export function ReplayNavigateEventFixture({
|
|
|
startTimestamp,
|
|
|
endTimestamp,
|
|
|
}: {
|
|
@@ -61,10 +77,10 @@ export function NavigateEvent({
|
|
|
}) {
|
|
|
const duration = endTimestamp.getTime() - startTimestamp.getTime(); // in MS
|
|
|
|
|
|
- return ReplayFrameEvents.SpanFrameEvent({
|
|
|
+ return ReplaySpanFrameEventFixture({
|
|
|
timestamp: startTimestamp,
|
|
|
data: {
|
|
|
- payload: ReplaySpanFrameData.NavigationFrame({
|
|
|
+ payload: ReplayNavigationFrameFixture({
|
|
|
op: 'navigation.navigate',
|
|
|
startTimestamp,
|
|
|
endTimestamp,
|
|
@@ -87,17 +103,17 @@ export function NavigateEvent({
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-export function MemoryEvent({
|
|
|
+export function ReplayMemoryEventFixture({
|
|
|
startTimestamp,
|
|
|
endTimestamp,
|
|
|
}: {
|
|
|
endTimestamp: Date;
|
|
|
startTimestamp: Date;
|
|
|
}) {
|
|
|
- return ReplayFrameEvents.SpanFrameEvent({
|
|
|
+ return ReplaySpanFrameEventFixture({
|
|
|
timestamp: startTimestamp,
|
|
|
data: {
|
|
|
- payload: ReplaySpanFrameData.MemoryFrame({
|
|
|
+ payload: ReplayMemoryFrameFixture({
|
|
|
op: 'memory',
|
|
|
startTimestamp,
|
|
|
endTimestamp,
|