🛶 test: Isolate Marketplace Retries and MCP OAuth Ownership

This commit is contained in:
Lia 2026-09-25 15:01:36 +00:00
parent 09c12b98a4
commit c4fbffb380
2 changed files with 8 additions and 1 deletions

View file

@ -58,7 +58,13 @@ const makeAgents = (count: number, offset: number): MockAgent[] =>
const routeMarketplace = async (page: Page, handler: (route: Route) => Promise<void>) => {
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;
}

View file

@ -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,