chatbot-template/tests/e2e/reasoning.setup.ts

21 lines
608 B
TypeScript
Raw Normal View History

import path from 'node:path';
2025-03-09 21:02:19 -07:00
import { expect, test as setup } from '@playwright/test';
import { ChatPage } from '../pages/chat';
2025-03-09 21:02:19 -07:00
const reasoningFile = path.join(
__dirname,
'../../playwright/.reasoning/session.json',
2025-03-09 21:02:19 -07:00
);
setup('switch to reasoning model', async ({ page }) => {
const chatPage = new ChatPage(page);
await chatPage.createNewChat();
await chatPage.chooseModelFromSelector('chat-model-reasoning');
await expect(chatPage.getSelectedModel()).resolves.toEqual('Reasoning model');
await page.waitForTimeout(1000);
await page.context().storageState({ path: reasoningFile });
});