buster/web/playwright-tests/0_Question_3.test.ts

18 lines
710 B
TypeScript
Raw Normal View History

2025-05-03 04:00:14 +08:00
import { test, expect } from '@playwright/test';
import { askQuestion, checkThatPageWasRedirected } from './question-helpers/ask-question';
const question =
'I need you to make a chart for me that shows my top 8 customers in the month of May. Can you make this chart sorted by the customers name? I want to see only 1 file created.';
test(`Question: ${question}`, async ({ page }) => {
await askQuestion(page, question);
await checkThatPageWasRedirected(page, ['reasoning', 'chart']);
//expect to for the text "Reasoned" on the page
await expect(page.getByText('Reasoned')).toBeVisible();
//expect to for the text "Chart" on the page
await expect(page.getByText('Chart')).toBeVisible();
});