1
1
import { test , expect } from '@playwright/test' ;
2
2
import axios , { AxiosError } from 'axios' ;
3
3
4
- const SENTRY_TEST_ORG_SLUG = 'sentry-sdks' ;
5
- const SENTRY_TEST_PROJECT = 'sentry-javascript-e2e-tests' ;
6
-
7
4
const EVENT_POLLING_TIMEOUT = 30_000 ;
8
5
9
6
const 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 ;
10
9
11
10
test ( 'Sends an exception to Sentry' , async ( { page } ) => {
12
11
await page . goto ( '/' ) ;
@@ -24,7 +23,7 @@ test('Sends an exception to Sentry', async ({ page }) => {
24
23
async ( ) => {
25
24
try {
26
25
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 } /` ,
28
27
{ headers : { Authorization : `Bearer ${ authToken } ` } } ,
29
28
) ;
30
29
return response . status ;
@@ -74,7 +73,7 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => {
74
73
async ( ) => {
75
74
try {
76
75
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 } /` ,
78
77
{ headers : { Authorization : `Bearer ${ authToken } ` } } ,
79
78
) ;
80
79
@@ -139,7 +138,7 @@ test('Sends a navigation transaction to Sentry', async ({ page }) => {
139
138
async ( ) => {
140
139
try {
141
140
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 } /` ,
143
142
{ headers : { Authorization : `Bearer ${ authToken } ` } } ,
144
143
) ;
145
144
0 commit comments