mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-02 12:22:22 +00:00
* 🧪 feat: add e2e playwright tests * 🧪 feat: Add Playwright Recording Harness * test: fix mock playwright config * test: harden mock e2e environment * test: preserve mock dotenv secrets * test: harden mock isolation setup * ci: cache mock e2e builds * test: harden e2e cache and recorder checks * test: preserve data-provider exports in oauth route test * test: isolate mock auth logout state * test: allow isolated logout smoke setup * test: prepare logout smoke auth via api * test: isolate oauth route module mock --------- Co-authored-by: Danny Avila <danny@librechat.ai>
23 lines
655 B
TypeScript
23 lines
655 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
import {
|
|
MOCK_ENDPOINTS,
|
|
NEW_CHAT_PATH,
|
|
mockReply,
|
|
selectMockEndpoint,
|
|
sendMessage,
|
|
} from './helpers';
|
|
|
|
test.describe('endpoint switching', () => {
|
|
for (const endpoint of MOCK_ENDPOINTS) {
|
|
test(`"${endpoint.label}" returns a streamed response`, async ({ page }) => {
|
|
test.setTimeout(60000);
|
|
await page.goto(NEW_CHAT_PATH, { timeout: 10000 });
|
|
|
|
await selectMockEndpoint(page, endpoint);
|
|
|
|
const response = await sendMessage(page, `hello ${endpoint.model}`);
|
|
expect(response.ok()).toBeTruthy();
|
|
await expect(mockReply(page)).toBeVisible();
|
|
});
|
|
}
|
|
});
|