Skip to content

Commit 4d41d23

Browse files
committed
remove unstable test, maybe unflake unrelated lcp test?
1 parent fde653e commit 4d41d23

File tree

3 files changed

+10
-51
lines changed

3 files changed

+10
-51
lines changed

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-relations/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</head>
66
<body>
77
<div id="content"></div>
8-
<img src="https://example.com/path/to/image.png" />
8+
<img src="https://example.com/library/image.png" />
99
<button type="button">Test button</button>
1010
</body>
1111
</html>

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-relations/test.ts

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName
1919
}
2020

2121
page.route('**', route => route.continue());
22-
page.route('**/path/to/image.png', async (route: Route) => {
22+
page.route('**/library/image.png', async (route: Route) => {
2323
return route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` });
2424
});
2525

@@ -28,8 +28,6 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName
2828
getFirstSentryEnvelopeRequest<Event>(page),
2929
page.goto(url),
3030
page.locator('button').click(),
31-
page.waitForTimeout(2000),
32-
// page.waitForFunction(() => {}),
3331
]);
3432

3533
expect(eventData.measurements).toBeDefined();
@@ -60,49 +58,3 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName
6058
expect(fcpValue).toBeGreaterThanOrEqual(ttfbValue!);
6159
expect(fpValue).toBeGreaterThanOrEqual(ttfbValue!);
6260
});
63-
64-
/**
65-
* Continuing the theme of odd tests, in this one, we check that LCP is greater or equal to FCP and FP.
66-
*
67-
* The problem: There are cases where for _some reason_ the browser reports lower LCP than FCP/FP values :(
68-
* This might have to do with timing inaccuracies in the browser or with some weird bug in the PerformanceObserver
69-
* or Web vitals library. While this shouldn't happen, checking that they're not _vastly_ off is at least better
70-
* than not checking at all, so we factor in a margin of error.
71-
*/
72-
sentryTest('LCP >= (FCP, FP)', async ({ browserName, getLocalTestPath, page }) => {
73-
// Only run in chromium to ensure all vitals are present
74-
if (shouldSkipTracingTest() || browserName !== 'chromium') {
75-
sentryTest.skip();
76-
}
77-
78-
page.route('**', route => route.continue());
79-
page.route('**/path/to/image.png', async (route: Route) => {
80-
return route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` });
81-
});
82-
83-
const url = await getLocalTestPath({ testDir: __dirname });
84-
const [eventData] = await Promise.all([
85-
getFirstSentryEnvelopeRequest<Event>(page),
86-
page.goto(url),
87-
page.locator('button').click(),
88-
page.waitForTimeout(2000),
89-
]);
90-
91-
expect(eventData.measurements).toBeDefined();
92-
93-
const lcpValue = eventData.measurements?.lcp?.value;
94-
const fcpValue = eventData.measurements?.fcp?.value;
95-
const fpValue = eventData.measurements?.fp?.value;
96-
97-
expect(lcpValue).toBeDefined();
98-
expect(fcpValue).toBeDefined();
99-
expect(fpValue).toBeDefined();
100-
101-
// Assumption: The browser can render at 60FPS which equals 1 frame every 16.6ms.
102-
// Rounded up, 20ms seems like a reasonable margin of error.
103-
const epsilon = 20;
104-
105-
// LCP >= (FCP, FP)
106-
expect(lcpValue).toBeGreaterThanOrEqual(fcpValue! - epsilon);
107-
expect(lcpValue).toBeGreaterThanOrEqual(fpValue! - epsilon);
108-
});

dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ Sentry.init({
2525
// Session Replay
2626
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
2727
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
28-
tunnel: 'http://localhost:3031/', // proxy server
28+
// tunnel: 'http://localhost:3031/', // proxy server
29+
30+
beforeSendTransaction(transaction) {
31+
console.log('beforeSendTransaction', transaction, transaction.measurements);
32+
return transaction;
33+
},
34+
35+
debug: true,
2936
});
3037

3138
startTransition(() => {

0 commit comments

Comments
 (0)