Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
79 lines
1.8 KiB
TypeScript
79 lines
1.8 KiB
TypeScript
import { test, expect } from '../../../fixtures/base';
|
|
|
|
test.use({ capability: 'kent' });
|
|
|
|
test.beforeEach(async ({ n8nContainer }) => {
|
|
await n8nContainer.services.kent.clear();
|
|
});
|
|
|
|
test.describe('Sentry baseline', {
|
|
annotation: [
|
|
{ type: 'owner', description: 'Catalysts' },
|
|
],
|
|
}, () => {
|
|
test('frontend error is captured', async ({ n8n, n8nContainer }) => {
|
|
const kent = n8nContainer.services.kent;
|
|
await n8n.navigate.toHome();
|
|
|
|
n8n.page.on('pageerror', () => {});
|
|
await n8n.page.evaluate(() => {
|
|
setTimeout(() => {
|
|
throw new Error('Test frontend error');
|
|
}, 0);
|
|
});
|
|
|
|
await expect
|
|
.poll(
|
|
async () =>
|
|
await kent.getEvents({
|
|
source: 'frontend',
|
|
type: 'error',
|
|
messageContains: 'Test frontend error',
|
|
}),
|
|
{ timeout: 10000 },
|
|
)
|
|
.toHaveLength(1);
|
|
});
|
|
|
|
test('backend transaction is captured', async ({ n8n, n8nContainer }) => {
|
|
const kent = n8nContainer.services.kent;
|
|
await n8n.navigate.toHome();
|
|
|
|
await expect
|
|
.poll(async () => await kent.getEvents({ source: 'backend', type: 'transaction' }), {
|
|
timeout: 10000,
|
|
})
|
|
.not.toHaveLength(0);
|
|
});
|
|
|
|
test('events have deployment identification via server_name tag', async ({
|
|
n8n,
|
|
n8nContainer,
|
|
}) => {
|
|
const kent = n8nContainer.services.kent;
|
|
await n8n.navigate.toHome();
|
|
|
|
n8n.page.on('pageerror', () => {});
|
|
await n8n.page.evaluate(() => {
|
|
setTimeout(() => {
|
|
throw new Error('Deployment test error');
|
|
}, 0);
|
|
});
|
|
|
|
await expect
|
|
.poll(
|
|
async () =>
|
|
await kent.getEvents({ source: 'frontend', messageContains: 'Deployment test error' }),
|
|
{ timeout: 10000 },
|
|
)
|
|
.toHaveLength(1);
|
|
|
|
const [frontendError] = await kent.getEvents({
|
|
source: 'frontend',
|
|
messageContains: 'Deployment test error',
|
|
});
|
|
|
|
expect(kent.getTags(frontendError)?.server_name).toBe('e2e-test-deployment');
|
|
});
|
|
});
|