feat: add reasoning tests (#856)

This commit is contained in:
Jeremy 2025-03-09 21:02:19 -07:00 committed by GitHub
parent 39729644df
commit 9628c54755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 420 additions and 155 deletions

20
tests/reasoning.setup.ts Normal file
View file

@ -0,0 +1,20 @@
import path from 'path';
import { expect, test as setup } from '@playwright/test';
import { ChatPage } from './pages/chat';
const reasoningFile = path.join(
__dirname,
'../playwright/.reasoning/session.json',
);
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 });
});