test: Mock config endpoint for auth regression tests (#9635)
This commit is contained in:
parent
2d5c559261
commit
779a37d5a9
1 changed files with 28 additions and 0 deletions
|
|
@ -18,6 +18,20 @@ test(
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await page.route("**/api/v1/config", (route) => {
|
||||||
|
route.fulfill({
|
||||||
|
status: 200,
|
||||||
|
contentType: "application/json",
|
||||||
|
body: JSON.stringify({
|
||||||
|
webhook_auth_enable: true,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
...route.request().headers(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
await loginLangflow(page);
|
await loginLangflow(page);
|
||||||
|
|
||||||
await awaitBootstrapTest(page, { skipGoto: true });
|
await awaitBootstrapTest(page, { skipGoto: true });
|
||||||
|
|
@ -61,6 +75,20 @@ test(
|
||||||
"user must be able to not see api key in webhook component when auto login is enabled",
|
"user must be able to not see api key in webhook component when auto login is enabled",
|
||||||
{ tag: ["@release"] },
|
{ tag: ["@release"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
|
await page.route("**/api/v1/config", (route) => {
|
||||||
|
route.fulfill({
|
||||||
|
status: 200,
|
||||||
|
contentType: "application/json",
|
||||||
|
body: JSON.stringify({
|
||||||
|
webhook_auth_enable: false,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
...route.request().headers(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
await awaitBootstrapTest(page);
|
await awaitBootstrapTest(page);
|
||||||
|
|
||||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue