Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import {
waitForReplayRequest,
} from '../../../../utils/replayHelpers';

sentryTest.skip(shouldSkipReplayTest(), 'Requires Replay');

sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestUrl, page }) => {
if (shouldSkipFeedbackTest() || shouldSkipReplayTest()) {
if (shouldSkipFeedbackTest()) {
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import {
shouldSkipTracingTest,
} from '../../../utils/helpers';

sentryTest.skip(shouldSkipTracingTest(), 'Requires tracing');

sentryTest(
'feedback should have trace_id when profiling is enabled and idle span has ended',
async ({ getLocalTestUrl, page, browserName }) => {
if (shouldSkipFeedbackTest() || shouldSkipTracingTest() || browserName !== 'chromium') {
if (shouldSkipFeedbackTest() || browserName !== 'chromium') {
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@ sentryTest('cultureContextIntegration captures locale, timezone, and calendar',
});
});

sentryTest(
'cultureContextIntegration adds locale, timezone, and calendar to spans',
async ({ getLocalTestUrl, page }) => {
sentryTest.skip(shouldSkipTracingTest());
const url = await getLocalTestUrl({ testDir: __dirname });
sentryTest.describe('tracing', () => {
sentryTest.skip(shouldSkipTracingTest(), 'Requires tracing');

const spanPromise = waitForStreamedSpan(page, span => span.is_segment && getSpanOp(span) === 'pageload');
sentryTest(
'cultureContextIntegration adds locale, timezone, and calendar to spans',
async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });

await page.goto(url);
const spanPromise = waitForStreamedSpan(page, span => span.is_segment && getSpanOp(span) === 'pageload');

const pageloadSpan = await spanPromise;
await page.goto(url);

expect(pageloadSpan.attributes['culture.locale']).toEqual({ type: 'string', value: expect.any(String) });
expect(pageloadSpan.attributes['culture.timezone']).toEqual({ type: 'string', value: expect.any(String) });
expect(pageloadSpan.attributes['culture.calendar']).toEqual({ type: 'string', value: expect.any(String) });
},
);
const pageloadSpan = await spanPromise;

expect(pageloadSpan.attributes['culture.locale']).toEqual({ type: 'string', value: expect.any(String) });
expect(pageloadSpan.attributes['culture.timezone']).toEqual({ type: 'string', value: expect.any(String) });
expect(pageloadSpan.attributes['culture.calendar']).toEqual({ type: 'string', value: expect.any(String) });
},
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ id: 'test-id' }) });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('GrowthBook onError: forked scopes are isolated', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('GrowthBook onError: forked scopes are isolated', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ id: 'test-id' }) });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest(
"GrowthBook onSpan: flags are added to active span's attributes on span end",
async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}

await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({}) });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluation error hook', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluation error hook', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { expect } from '@playwright/test';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest } from '../../../../../utils/helpers';

sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Logs and returns if isEnabled does not match expected signature', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
const bundleKey = process.env.PW_BUNDLE || '';
const hasDebug = !bundleKey.includes('_min');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
FLAG_BUFFER_SIZE,
} from '../../../../../../utils/helpers';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
waitForErrorRequest,
} from '../../../../../../utils/helpers';

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
sentryTest.skip();
}
sentryTest.skip(shouldSkipFeatureFlagsTest(), 'Requires feature flag integrations');

sentryTest('Flag evaluations in forked scopes are stored separately.', async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { waitForStreamedSpan } from '../../../../../utils/spanUtils';
import { sentryTest } from '../../../../../utils/fixtures';
import { shouldSkipFeatureFlagsTest, shouldSkipTracingTest, MAX_FLAGS_PER_SPAN } from '../../../../../utils/helpers';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest.skip(
shouldSkipTracingTest() || shouldSkipFeatureFlagsTest(),
'Requires tracing and feature flag integrations',
);

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
await page.route(/^https:\/\/dsn\.ingest\.sentry\.io\//, route => {
return route.fulfill({
status: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { getSpanOp, waitForStreamedSpan } from '../../../../utils/spanUtils';
import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest.skip(shouldSkipTracingTest(), 'Requires tracing');

// Duplicate from subject.js
const query = `query Test{
people {
Expand All @@ -12,10 +14,6 @@ const query = `query Test{
}`;

sentryTest('should update spans for GraphQL fetch requests', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', route => {
Expand Down Expand Up @@ -59,10 +57,6 @@ sentryTest('should update spans for GraphQL fetch requests', async ({ getLocalTe
});

sentryTest('should update breadcrumbs for GraphQL fetch requests', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

await page.route('**/foo', route => {
Expand Down
Loading
Loading