2025-04-20 22:27:20 -07:00
|
|
|
import path from 'node:path';
|
2025-03-09 21:02:19 -07:00
|
|
|
import { expect, test as setup } from '@playwright/test';
|
2025-04-20 22:27:20 -07:00
|
|
|
import { ChatPage } from '../pages/chat';
|
2025-03-09 21:02:19 -07:00
|
|
|
|
|
|
|
|
const reasoningFile = path.join(
|
|
|
|
|
__dirname,
|
2025-04-20 22:27:20 -07:00
|
|
|
'../../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 });
|
|
|
|
|
});
|