<?php

declare(strict_types=1);

namespace Interfaces\Http\Sentry;

use Modules\Projects\Domain\Project;
use Modules\Projects\Domain\ValueObject\Key;
use Nyholm\Psr7\Stream;
use Tests\App\Http\ResponseAssertions;
use Tests\Feature\Interfaces\Http\ControllerTestCase;

final class SentryVueTransactionActionTest extends ControllerTestCase
{
    protected const JSON = <<<'BODY'
{"event_id":"82e8d5737bf54d13bf24a70b1a434c3c","sent_at":"2024-06-14T08:08:36.906Z","sdk":{"name":"sentry.javascript.vue","version":"8.9.2"},"trace":{"environment":"production","public_key":"sentry","trace_id":"3033d74447be48bb86fb28318a1b68a6","sample_rate":"1","transaction":"home","sampled":"true"}}
{"type":"transaction"}
{"contexts":{"trace":{"span_id":"841f8592867c450c","trace_id":"3033d74447be48bb86fb28318a1b68a6","data":{"sentry.origin":"auto.pageload.vue","sentry.op":"pageload","sentry.source":"custom","sentry.sample_rate":1,"effectiveConnectionType":"4g","deviceMemory":"8 GB","hardwareConcurrency":"16","lcp.element":"body > div#app > main > div.item > div.details","lcp.size":49555,"sentry.idle_span_finish_reason":"idleTimeout"},"op":"pageload","origin":"auto.pageload.vue"}},"spans":[{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"ui.long-task"},"description":"Main UI thread blocked","op":"ui.long-task","parent_span_id":"841f8592867c450c","span_id":"b5b5333551b56541","start_timestamp":1718352515.7668002,"timestamp":1718352515.8288002,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"unloadEvent","op":"browser","parent_span_id":"841f8592867c450c","span_id":"826b503343f5a479","start_timestamp":1718352515.648,"timestamp":1718352515.648,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"domContentLoadedEvent","op":"browser","parent_span_id":"841f8592867c450c","span_id":"a171f16386a42060","start_timestamp":1718352515.7565,"timestamp":1718352515.7565,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"loadEvent","op":"browser","parent_span_id":"841f8592867c450c","span_id":"b4edea0b02db8208","start_timestamp":1718352515.8704,"timestamp":1718352515.8704998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"connect","op":"browser","parent_span_id":"841f8592867c450c","span_id":"b00924a8163ffe9f","start_timestamp":1718352515.3219,"timestamp":1718352515.6237,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"cache","op":"browser","parent_span_id":"841f8592867c450c","span_id":"b7df06d38dabed5b","start_timestamp":1718352515.3202,"timestamp":1718352515.3219,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"DNS","op":"browser","parent_span_id":"841f8592867c450c","span_id":"a1e8555f981eebf7","start_timestamp":1718352515.3219,"timestamp":1718352515.3219,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"request","op":"browser","parent_span_id":"841f8592867c450c","span_id":"ac7e68d267b38e47","start_timestamp":1718352515.6238,"timestamp":1718352515.6438,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.ui.browser.metrics","sentry.op":"browser"},"description":"response","op":"browser","parent_span_id":"841f8592867c450c","span_id":"8391ba7539f776d7","start_timestamp":1718352515.643,"timestamp":1718352515.6438,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.ui.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":137419,"http.decoded_response_content_length":137419,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/@vite/client","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"91b02d267cdd800c","start_timestamp":1718352515.6499999,"timestamp":1718352515.6602998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":7623,"http.decoded_response_content_length":7623,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/main.js?t=1718349990703","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"82f3b7c975cd340b","start_timestamp":1718352515.6501,"timestamp":1718352515.66,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":3111,"http.decoded_response_content_length":3111,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/assets/main.css","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"9e5dd154b305c6eb","start_timestamp":1718352515.6917999,"timestamp":1718352515.6982,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":5237,"http.decoded_response_content_length":5237,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/vue.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"af69153969c06e4f","start_timestamp":1718352515.692,"timestamp":1718352515.6966,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":47069,"http.decoded_response_content_length":47069,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/pinia.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"81c8a9feec46496e","start_timestamp":1718352515.6921,"timestamp":1718352515.697,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":721905,"http.decoded_response_content_length":721905,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/@sentry_vue.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"837b18d230f409d0","start_timestamp":1718352515.6922998,"timestamp":1718352515.6987998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4310,"http.decoded_response_content_length":4310,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/router/index.js","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"b539da75b55cd2af","start_timestamp":1718352515.6924,"timestamp":1718352515.6991,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":7256,"http.decoded_response_content_length":7256,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/App.vue?t=1718349953633","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"989882d495b41ce8","start_timestamp":1718352515.6924,"timestamp":1718352515.6983,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4438,"http.decoded_response_content_length":4438,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/vite/dist/client/env.mjs","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"b75413d1c6f99d92","start_timestamp":1718352515.6927,"timestamp":1718352515.6992,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":94107,"http.decoded_response_content_length":94107,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/vue-router.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"89f0e702bc5885d4","start_timestamp":1718352515.7019,"timestamp":1718352515.7056,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":2210,"http.decoded_response_content_length":2210,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/views/HomeView.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"856626702ee85948","start_timestamp":1718352515.7021,"timestamp":1718352515.7078001,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4172,"http.decoded_response_content_length":4172,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/HelloWorld.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"96074654d44c5f63","start_timestamp":1718352515.7021,"timestamp":1718352515.7087,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":352,"http.decoded_response_content_length":352,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/assets/logo.svg?import","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"81c8c63d2922d13d","start_timestamp":1718352515.7022998,"timestamp":1718352515.7094,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":1628,"http.decoded_response_content_length":1628,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/App.vue?vue&type=style&index=0&scoped=7a7a37b1&lang.css","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"975b8c779565638d","start_timestamp":1718352515.7024,"timestamp":1718352515.7096999,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":1126,"http.decoded_response_content_length":1126,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/@id/__x00__plugin-vue:export-helper","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"92bbb121b98a6841","start_timestamp":1718352515.7024999,"timestamp":1718352515.7097998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":337087,"http.decoded_response_content_length":337087,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/chunk-U6BEPC57.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"8dadf4d288b42e03","start_timestamp":1718352515.7026,"timestamp":1718352515.708,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":0,"http.response_content_length":4624,"http.decoded_response_content_length":4624,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/node_modules/.vite/deps/chunk-YFT6OQ5R.js?v=ce5d28cb","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"a7ed0f99c1e42b60","start_timestamp":1718352515.7029998,"timestamp":1718352515.7071998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":18644,"http.decoded_response_content_length":18644,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/TheWelcome.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"8c0f05fa4155a930","start_timestamp":1718352515.7196999,"timestamp":1718352515.7222998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":964,"http.decoded_response_content_length":964,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/HelloWorld.vue?vue&type=style&index=0&scoped=e17ea971&lang.css","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"a0e3df034f206855","start_timestamp":1718352515.7199,"timestamp":1718352515.7227998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4157,"http.decoded_response_content_length":4157,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/WelcomeItem.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"8383b8357686138d","start_timestamp":1718352515.7292,"timestamp":1718352515.7324,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4564,"http.decoded_response_content_length":4564,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/icons/IconDocumentation.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"905460fa539b5c2c","start_timestamp":1718352515.7293,"timestamp":1718352515.7329,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":3777,"http.decoded_response_content_length":3777,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/icons/IconTooling.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"958e4fa924ff8e17","start_timestamp":1718352515.7295,"timestamp":1718352515.7338002,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":6239,"http.decoded_response_content_length":6239,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/icons/IconEcosystem.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"a2bdd16d96cbae2a","start_timestamp":1718352515.7295,"timestamp":1718352515.734,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":4084,"http.decoded_response_content_length":4084,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/icons/IconCommunity.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"b2f20676ceedd4f7","start_timestamp":1718352515.7296999,"timestamp":1718352515.7343998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":2286,"http.decoded_response_content_length":2286,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/icons/IconSupport.vue","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"83f16964c8b89b23","start_timestamp":1718352515.7298,"timestamp":1718352515.735,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.script","http.response_transfer_size":300,"http.response_content_length":1957,"http.decoded_response_content_length":1957,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/components/WelcomeItem.vue?vue&type=style&index=0&scoped=bd9b3c35&lang.css","op":"resource.script","parent_span_id":"841f8592867c450c","span_id":"ada6b5174c051375","start_timestamp":1718352515.7331,"timestamp":1718352515.7375998,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"mark"},"description":"sentry-tracing-init","op":"mark","parent_span_id":"841f8592867c450c","span_id":"94fc4b58fb79dc51","start_timestamp":1718352515.7432,"timestamp":1718352515.7432,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.img","http.response_transfer_size":300,"http.response_content_length":276,"http.decoded_response_content_length":276,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/src/assets/logo.svg","op":"resource.img","parent_span_id":"841f8592867c450c","span_id":"b23f32933cdb690e","start_timestamp":1718352515.7517,"timestamp":1718352515.7575,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"paint"},"description":"first-paint","op":"paint","parent_span_id":"841f8592867c450c","span_id":"8bd4e783ba89f70a","start_timestamp":1718352515.7895,"timestamp":1718352515.7895,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"paint"},"description":"first-contentful-paint","op":"paint","parent_span_id":"841f8592867c450c","span_id":"9a53545f0facc7b8","start_timestamp":1718352515.7895,"timestamp":1718352515.7895,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"},{"data":{"sentry.origin":"auto.resource.browser.metrics","sentry.op":"resource.other","http.response_transfer_size":300,"http.response_content_length":4286,"http.decoded_response_content_length":4286,"resource.render_blocking_status":"non-blocking","url.scheme":"http","server.address":"localhost:5173","url.same_origin":true},"description":"/favicon.ico","op":"resource.other","parent_span_id":"841f8592867c450c","span_id":"92b18e514d21becb","start_timestamp":1718352515.8724,"timestamp":1718352515.8778,"trace_id":"3033d74447be48bb86fb28318a1b68a6","origin":"auto.resource.browser.metrics"}],"start_timestamp":1718352515.3165,"timestamp":1718352515.8778,"transaction":"home","type":"transaction","transaction_info":{"source":"custom"},"measurements":{"lcp":{"value":473,"unit":"millisecond"},"ttfb":{"value":326.5,"unit":"millisecond"},"fp":{"value":473,"unit":"millisecond"},"fcp":{"value":473,"unit":"millisecond"},"connection.rtt":{"value":150,"unit":"millisecond"},"ttfb.requestTime":{"value":19.200000001117587,"unit":"millisecond"}},"platform":"javascript","request":{"url":"http://localhost:5173/","headers":{"Referer":"http://localhost:5173/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"}},"event_id":"82e8d5737bf54d13bf24a70b1a434c3c","environment":"production","sdk":{"integrations":["InboundFilters","FunctionToString","BrowserApiErrors","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","HttpContext","Vue","BrowserTracing","Replay","ReplayCanvas"],"name":"sentry.javascript.vue","version":"8.9.2","packages":[{"name":"npm:@sentry/vue","version":"8.9.2"}]},"breadcrumbs":[{"timestamp":1718352515.752,"category":"navigation","data":{"from":"/","to":"/"}},{"timestamp":1718352516.017,"category":"console","data":{"arguments":["[vite] connected."],"logger":"console"},"level":"debug","message":"[vite] connected."}]}
BODY;

    private Project $project;

    protected function setUp(): void
    {
        parent::setUp();

        $this->project = $this->createProject('foo');
    }

    public function testSend(): void
    {
        $this->makeRequest(project: $this->project->getKey())->assertOk();

        $this->markTestIncomplete('This test has not been implemented yet.');
    }

    private function makeRequest(string $secret = 'secret', string|Key $project = 'foo'): ResponseAssertions
    {
        return $this->http
            ->postJson(
                uri: '/api/' . $project . '/envelope/?sentry_key=' . $secret . '&sentry_version=7&sentry_client=sentry.javascript.vue%2F8.9.2',
                data: Stream::create(self::JSON),
                headers: [
                    'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
                ],
            );
    }
}
