diff --git a/e2e/specs/mock/scenarios/marketplace-recovery.spec.ts b/e2e/specs/mock/scenarios/marketplace-recovery.spec.ts index 1382fe7c3d..c147135c3b 100644 --- a/e2e/specs/mock/scenarios/marketplace-recovery.spec.ts +++ b/e2e/specs/mock/scenarios/marketplace-recovery.spec.ts @@ -58,7 +58,13 @@ const makeAgents = (count: number, offset: number): MockAgent[] => const routeMarketplace = async (page: Page, handler: (route: Route) => Promise) => { await page.route('**/api/agents*', async (route) => { const requestUrl = new URL(route.request().url()); - if (route.request().method() !== 'GET' || requestUrl.pathname !== '/api/agents') { + // The agent selector also calls this endpoint and now refreshes on window focus. + // Marketplace always sends its sort; only those requests belong to this fixture. + if ( + route.request().method() !== 'GET' || + requestUrl.pathname !== '/api/agents' || + !requestUrl.searchParams.has('sort') + ) { await route.continue(); return; } diff --git a/packages/api/src/mcp/__tests__/MCPConnectionFactory.oauthSdk.integration.test.ts b/packages/api/src/mcp/__tests__/MCPConnectionFactory.oauthSdk.integration.test.ts index 7b1ef720ec..1b6fead036 100644 --- a/packages/api/src/mcp/__tests__/MCPConnectionFactory.oauthSdk.integration.test.ts +++ b/packages/api/src/mcp/__tests__/MCPConnectionFactory.oauthSdk.integration.test.ts @@ -259,6 +259,7 @@ describe('MCPConnectionFactory OAuth against real SDK Streamable HTTP server', ( const manager = new MCPManager(); jest.spyOn(manager, 'getConnection').mockResolvedValue(connection); const registrySpy = jest.spyOn(MCPServersRegistry, 'getInstance').mockReturnValue({ + isAppServerConfig: jest.fn().mockResolvedValue(false), resolveAllowlists: jest.fn().mockResolvedValue({ allowedDomains: null, allowedAddresses: null,