fix: avoid stray zero in consultation composer
This commit is contained in:
@@ -24,9 +24,14 @@ for (const width of [319, 508]) for (const kind of ['ordinary', 'ideas', 'struct
|
||||
test(`${kind} pins the current tool and composer at ${width}px`, async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1180, height: 800 });
|
||||
const errors: string[] = []; page.on('pageerror', error => errors.push(error.message));
|
||||
await page.addInitScript(() => localStorage.setItem(
|
||||
'makelore-consultation-draft:fixture:fixture:friend', JSON.stringify({ text: '', references: [] }),
|
||||
));
|
||||
await page.goto(`${url}?kind=${kind}&width=${width}`);
|
||||
const input = page.getByRole('textbox', { name: '向智能体提问' });
|
||||
await expect(input).toBeEnabled();
|
||||
await expect(page.locator('form')).not.toHaveText(/^0/);
|
||||
await expect(page.getByText('查看旧版朋友草稿')).toHaveCount(0);
|
||||
const tool = page.getByTestId('teacher-discussion');
|
||||
if (kind === 'ordinary') {
|
||||
await expect(tool).toHaveCount(0);
|
||||
|
||||
Reference in New Issue
Block a user