mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-11 01:45:58 +00:00
fix: align auth-disabled mode and mock history loading (#3471)
* fix: align auth-disabled mode and mock history loading * fix: address auth-disabled review feedback * test: cover auth-disabled backend contract * style: format frontend tests * fix: address follow-up review comments
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
import { AUTH_DISABLED_USER } from "../../src/core/auth/auth-disabled-user";
|
||||
|
||||
const APP = "http://localhost:3000";
|
||||
|
||||
test.describe("auth-disabled contract (real backend)", () => {
|
||||
test("gateway /auth/me returns the frontend synthetic user without a cookie", async ({
|
||||
context,
|
||||
}) => {
|
||||
const resp = await context.request.get(`${APP}/api/v1/auth/me`);
|
||||
|
||||
expect(resp.status(), await resp.text()).toBe(200);
|
||||
await expect(resp.json()).resolves.toEqual(AUTH_DISABLED_USER);
|
||||
});
|
||||
});
|
||||
@@ -101,10 +101,11 @@ test.describe("real backend render (replay, no API key)", () => {
|
||||
EXPECTED_SUGGESTION,
|
||||
"fixture should contain a suggestions turn (re-record; the record spec waits for /suggestions)",
|
||||
).not.toBe("");
|
||||
await expect(page.getByText(EXPECTED_TITLE)).toBeVisible({
|
||||
const chat = page.locator("#chat");
|
||||
await expect(chat.getByText(EXPECTED_TITLE)).toBeVisible({
|
||||
timeout: 60_000,
|
||||
});
|
||||
await expect(page.getByText(EXPECTED_SUGGESTION)).toBeVisible({
|
||||
await expect(chat.getByText(EXPECTED_SUGGESTION)).toBeVisible({
|
||||
timeout: 30_000,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user