Added more test cases and fix system partition key load issue (#2126)

* Added more test cases and fix system partition key load issue

* Fix unit tests and fix ci

* Updated test snapsho
This commit is contained in:
sunghyunkang1111
2025-04-30 15:18:11 -05:00
committed by GitHub
parent fe73d0a1c6
commit bb66deb3a4
11 changed files with 136 additions and 31 deletions

23
test/CORSBypass.ts Normal file
View File

@@ -0,0 +1,23 @@
import { Page } from "@playwright/test";
export async function setupCORSBypass(page: Page) {
await page.route("**/api/mongo/explorer{,/**}", async (route) => {
const response = await route.fetch({
headers: {
...route.request().headers(),
},
});
await route.fulfill({
status: response.status(),
headers: {
...response.headers(),
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Credentials": "*",
},
body: await response.body(),
});
});
}