clean routes
This commit is contained in:
@@ -136,6 +136,17 @@ async function runWebsiteSmokeScenario(args: {
|
||||
if (resourceType === 'fetch' && url.includes('_rsc=')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore fetch requests to the expected redirect target during page redirects
|
||||
// This handles cases like /sponsor -> /sponsor/dashboard where the redirect
|
||||
// causes an aborted fetch request to the target URL
|
||||
if (resourceType === 'fetch' && route.expectedPathTemplate) {
|
||||
const expectedPath = resolvePathTemplate(route.expectedPathTemplate, route.params);
|
||||
const urlObj = new URL(url);
|
||||
if (urlObj.pathname === expectedPath) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
requestFailures.push({
|
||||
|
||||
Reference in New Issue
Block a user