mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-20 15:02:02 +00:00
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Backend Unit Tests / backend (push) Blocked by required conditions
Channel Gateway / gateway (push) Waiting to run
Codegraph E2E Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Frontend Unit Tests / frontend (push) Blocked by required conditions
Playwright E2E Tests / Codegraph select (push) Waiting to run
Playwright E2E Tests / Shard timings (push) Waiting to run
Playwright E2E Tests / e2e () (push) Blocked by required conditions
Playwright E2E Tests / MCP list_changed (replica count 1) (push) Blocked by required conditions
Playwright E2E Tests / MCP list_changed (replica count 2) (push) Blocked by required conditions
Playwright E2E Tests / MCP Apps (browser and server) (push) Waiting to run
Playwright E2E Tests / e2e (push) Blocked by required conditions
Playwright Shard Timings / Record shard timings (push) Waiting to run
Move the existing streaming fade engine into @librechat/chat and its waiting-dot, cursor and fade styles into the shared client stylesheet. Use the effective host smoothing policy consistently in Markdown, including nested subagent content, while preserving optional renderer callbacks and raw fallback behavior.
116 lines
4.5 KiB
TypeScript
116 lines
4.5 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
import type { Page } from '@playwright/test';
|
|
import {
|
|
MOCK_ENDPOINTS,
|
|
NEW_CHAT_PATH,
|
|
messagesView,
|
|
selectMockEndpoint,
|
|
sendMessage,
|
|
} from '../helpers';
|
|
|
|
test.describe('streaming markdown blocks', () => {
|
|
test('preserves completed blocks while streaming and renders the final markdown @scenario:streamed-markdown-keeps-completed-blocks-and-final-content', async ({
|
|
page,
|
|
}) => {
|
|
test.setTimeout(90_000);
|
|
await page.goto(NEW_CHAT_PATH, { timeout: 10_000 });
|
|
await selectMockEndpoint(page, MOCK_ENDPOINTS[0]);
|
|
|
|
const response = await sendMessage(page, 'E2E_STREAMING_MARKDOWN_REPLY');
|
|
expect(response.ok()).toBeTruthy();
|
|
|
|
const assistantMessage = messagesView(page).locator('.message-render').last();
|
|
await expect(page.getByRole('button', { name: 'Stop generating' })).toBeVisible({
|
|
timeout: 30_000,
|
|
});
|
|
await expect(
|
|
assistantMessage.getByRole('heading', { name: 'E2E streaming markdown heading' }),
|
|
).toBeVisible({ timeout: 30_000 });
|
|
|
|
await expect(assistantMessage.getByText('E2E streaming markdown final paragraph.')).toBeVisible(
|
|
{ timeout: 60_000 },
|
|
);
|
|
await expect(
|
|
assistantMessage.locator('code').filter({ hasText: 'e2eIncrementalMarkdown' }),
|
|
).toBeVisible();
|
|
await expect(assistantMessage.getByRole('table')).toBeVisible();
|
|
await expect(assistantMessage).toContainText('日本語');
|
|
});
|
|
|
|
const checkStreamingFade = async (page: Page, reducedMotion: 'no-preference' | 'reduce') => {
|
|
await page.emulateMedia({ reducedMotion });
|
|
await page.goto(NEW_CHAT_PATH, { timeout: 10_000 });
|
|
await selectMockEndpoint(page, MOCK_ENDPOINTS[0]);
|
|
expect((await sendMessage(page, 'E2E_STREAMING_MARKDOWN_REPLY')).ok()).toBeTruthy();
|
|
const message = messagesView(page).locator('.message-render').last();
|
|
await expect(page.getByRole('button', { name: 'Stop generating' })).toBeVisible();
|
|
if (reducedMotion === 'reduce') {
|
|
await expect(message.locator('.result-streaming')).toBeVisible();
|
|
await expect(message.locator('[data-lc-fade]')).toHaveCount(0);
|
|
} else {
|
|
await expect(message.locator('[data-lc-fade]').first()).toBeAttached();
|
|
await expect(message.locator('.result-streaming')).toHaveCount(0);
|
|
expect(
|
|
await message
|
|
.locator('[data-lc-fade]')
|
|
.first()
|
|
.evaluate((element) => getComputedStyle(element).animationName),
|
|
).toBe('lc-fade-in');
|
|
}
|
|
await expect(message.getByText('E2E streaming markdown final paragraph.')).toBeVisible({
|
|
timeout: 60_000,
|
|
});
|
|
await expect(page.getByRole('button', { name: 'Stop generating' })).toHaveCount(0);
|
|
await expect(message.locator('[data-lc-fade], .result-streaming')).toHaveCount(0);
|
|
};
|
|
|
|
test('respects normal motion for streaming fade and cursor @scenario:streaming-fade-no-preference', async ({
|
|
page,
|
|
}) => {
|
|
await checkStreamingFade(page, 'no-preference');
|
|
});
|
|
|
|
test('respects reduced motion for streaming fade and cursor @scenario:streaming-fade-reduce', async ({
|
|
page,
|
|
}) => {
|
|
await checkStreamingFade(page, 'reduce');
|
|
});
|
|
|
|
test('isolates markdown blocks across concurrent conversations @scenario:concurrent-streams-keep-message-blocks-isolated', async ({
|
|
page,
|
|
context,
|
|
}) => {
|
|
test.setTimeout(120_000);
|
|
const secondPage = await context.newPage();
|
|
try {
|
|
await Promise.all([
|
|
page.goto(NEW_CHAT_PATH, { timeout: 10_000 }),
|
|
secondPage.goto(NEW_CHAT_PATH, { timeout: 10_000 }),
|
|
]);
|
|
await Promise.all([
|
|
selectMockEndpoint(page, MOCK_ENDPOINTS[0]),
|
|
selectMockEndpoint(secondPage, MOCK_ENDPOINTS[0]),
|
|
]);
|
|
|
|
await Promise.all([
|
|
sendMessage(page, 'E2E_STREAMING_MARKDOWN_REPLY'),
|
|
sendMessage(secondPage, 'E2E_STREAMING_MARKDOWN_REPLY'),
|
|
]);
|
|
|
|
const firstAssistantMessage = messagesView(page).locator('.message-render').last();
|
|
const secondAssistantMessage = messagesView(secondPage).locator('.message-render').last();
|
|
await Promise.all([
|
|
expect(
|
|
firstAssistantMessage.getByText('E2E streaming markdown final paragraph.'),
|
|
).toBeVisible({ timeout: 90_000 }),
|
|
expect(
|
|
secondAssistantMessage.getByText('E2E streaming markdown final paragraph.'),
|
|
).toBeVisible({ timeout: 90_000 }),
|
|
]);
|
|
await expect(firstAssistantMessage).toContainText('日本語');
|
|
await expect(secondAssistantMessage).toContainText('日本語');
|
|
} finally {
|
|
await secondPage.close();
|
|
}
|
|
});
|
|
});
|