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 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",
|
||||
{ tag: ["@release"] },
|
||||
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 page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue