11import { describe , it , expect } from "vitest" ;
22import { http , HttpResponse } from "msw" ;
3- import { mswServer , profileDetailsFixture } from "@sentry/mcp-server-mocks" ;
3+ import {
4+ mswServer ,
5+ transactionProfileV1Fixture ,
6+ } from "@sentry/mcp-server-mocks" ;
47import getProfileDetails from "./get-profile-details" ;
58
69const baseContext = {
@@ -16,7 +19,7 @@ describe("get_profile_details", () => {
1619 it ( "fetches and formats a transaction profile from profileUrl" , async ( ) => {
1720 const result = await getProfileDetails . handler (
1821 {
19- profileUrl : `https://sentry-mcp-evals.sentry.io/explore/profiling/profile/backend/${ profileDetailsFixture . profile_id } /flamegraph/` ,
22+ profileUrl : `https://sentry-mcp-evals.sentry.io/explore/profiling/profile/backend/${ transactionProfileV1Fixture . profile_id } /flamegraph/` ,
2023 regionUrl : null ,
2124 focusOnUserCode : true ,
2225 } ,
@@ -72,14 +75,16 @@ describe("get_profile_details", () => {
7275 {
7376 organizationSlug : "sentry-mcp-evals" ,
7477 projectSlugOrId : "backend" ,
75- profileId : profileDetailsFixture . profile_id ,
78+ profileId : transactionProfileV1Fixture . profile_id ,
7679 regionUrl : null ,
7780 focusOnUserCode : false ,
7881 } ,
7982 baseContext ,
8083 ) ;
8184
82- expect ( result ) . toContain ( `# Profile ${ profileDetailsFixture . profile_id } ` ) ;
85+ expect ( result ) . toContain (
86+ `# Profile ${ transactionProfileV1Fixture . profile_id } ` ,
87+ ) ;
8388 expect ( result ) . toContain ( "**Project**: backend" ) ;
8489 expect ( result ) . toContain ( "cursor.execute" ) ;
8590 } ) ;
@@ -135,7 +140,7 @@ describe("get_profile_details", () => {
135140 await expect (
136141 getProfileDetails . handler (
137142 {
138- profileUrl : `https://other-org.sentry.io/explore/profiling/profile/backend/${ profileDetailsFixture . profile_id } /flamegraph/` ,
143+ profileUrl : `https://other-org.sentry.io/explore/profiling/profile/backend/${ transactionProfileV1Fixture . profile_id } /flamegraph/` ,
139144 organizationSlug : "sentry-mcp-evals" ,
140145 projectSlugOrId : "backend" ,
141146 regionUrl : null ,
@@ -152,7 +157,7 @@ describe("get_profile_details", () => {
152157 await expect (
153158 getProfileDetails . handler (
154159 {
155- profileUrl : `https://sentry-mcp-evals.sentry.io/explore/profiling/profile/frontend/${ profileDetailsFixture . profile_id } /flamegraph/` ,
160+ profileUrl : `https://sentry-mcp-evals.sentry.io/explore/profiling/profile/frontend/${ transactionProfileV1Fixture . profile_id } /flamegraph/` ,
156161 organizationSlug : "sentry-mcp-evals" ,
157162 projectSlugOrId : "backend" ,
158163 regionUrl : null ,
0 commit comments