11import { test , expect } from '@playwright/test' ;
22import axios , { AxiosError } from 'axios' ;
33
4- const SENTRY_TEST_ORG_SLUG = 'sentry-sdks' ;
5- const SENTRY_TEST_PROJECT = 'sentry-javascript-e2e-tests' ;
6-
74const EVENT_POLLING_TIMEOUT = 30_000 ;
85
96const authToken = process . env . E2E_TEST_AUTH_TOKEN ;
7+ const sentryTestOrgSlug = process . env . E2E_TEST_SENTRY_ORG_SLUG ;
8+ const sentryTestProject = process . env . E2E_TEST_SENTRY_TEST_PROJECT ;
109
1110test ( 'Sends an exception to Sentry' , async ( { page } ) => {
1211 await page . goto ( '/' ) ;
@@ -24,7 +23,7 @@ test('Sends an exception to Sentry', async ({ page }) => {
2423 async ( ) => {
2524 try {
2625 const response = await axios . get (
27- `https://sentry.io/api/0/projects/${ SENTRY_TEST_ORG_SLUG } /${ SENTRY_TEST_PROJECT } /events/${ exceptionEventId } /` ,
26+ `https://sentry.io/api/0/projects/${ sentryTestOrgSlug } /${ sentryTestProject } /events/${ exceptionEventId } /` ,
2827 { headers : { Authorization : `Bearer ${ authToken } ` } } ,
2928 ) ;
3029 return response . status ;
@@ -74,7 +73,7 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => {
7473 async ( ) => {
7574 try {
7675 const response = await axios . get (
77- `https://sentry.io/api/0/projects/${ SENTRY_TEST_ORG_SLUG } /${ SENTRY_TEST_PROJECT } /events/${ transactionEventId } /` ,
76+ `https://sentry.io/api/0/projects/${ sentryTestOrgSlug } /${ sentryTestProject } /events/${ transactionEventId } /` ,
7877 { headers : { Authorization : `Bearer ${ authToken } ` } } ,
7978 ) ;
8079
@@ -139,7 +138,7 @@ test('Sends a navigation transaction to Sentry', async ({ page }) => {
139138 async ( ) => {
140139 try {
141140 const response = await axios . get (
142- `https://sentry.io/api/0/projects/${ SENTRY_TEST_ORG_SLUG } /${ SENTRY_TEST_PROJECT } /events/${ transactionEventId } /` ,
141+ `https://sentry.io/api/0/projects/${ sentryTestOrgSlug } /${ sentryTestProject } /events/${ transactionEventId } /` ,
143142 { headers : { Authorization : `Bearer ${ authToken } ` } } ,
144143 ) ;
145144
0 commit comments