mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 13:33:45 +00:00
🛶 test: Isolate Marketplace Retries and MCP OAuth Ownership
This commit is contained in:
parent
09c12b98a4
commit
c4fbffb380
2 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue