Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { appConfig } from './app/app.config';
import * as Sentry from '@sentry/angular';

Sentry.init({
traceLifecycle: 'static',
// Cannot use process.env here, so we hardcode the DSN
dsn: 'https://3b6c388182fb435097f41d181be2b2ba@o4504321058471936.ingest.sentry.io/4504321066008576',
tracesSampleRate: 1.0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, test } from '@playwright/test';
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
import { getSpanOp, waitForError, waitForStreamedSpan } from '@sentry-internal/test-utils';

test('sends an error', async ({ page }) => {
const errorPromise = waitForError('angular-21', async errorEvent => {
Expand Down Expand Up @@ -30,16 +30,16 @@ test('sends an error', async ({ page }) => {
});

test('assigns the correct transaction value after a navigation', async ({ page }) => {
const pageloadTxnPromise = waitForTransaction('angular-21', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
const pageloadSpanPromise = waitForStreamedSpan('angular-21', span => {
return span.is_segment && getSpanOp(span) === 'pageload';
});

const errorPromise = waitForError('angular-21', async errorEvent => {
return !errorEvent.type;
});

await page.goto(`/`);
await pageloadTxnPromise;
await pageloadSpanPromise;

await page.waitForTimeout(5000);

Expand Down
Loading
Loading