import { test, expect } from '@playwright/test';
import { env, aiClick, aiVerify } from '@playmatic/sdk';
// Fully Playwright compatible test
test('Playmatic Meeting Calendar Loads', {
annotation: [
{
// Goal is used by the agent for test maintenance
type: 'playmatic-goal',
description: 'User navigates to Playmatic.ai, goes to Pricing page, clicks Book Demo, and interacts with calendar'
}
]
}, async ({ page }) => {
// Test steps are used by the agent for maintenance
await test.step('Navigate to Playmatic.ai and go to Pricing page', async () => {
await page.goto('https://playmatic.ai');
await page.getByRole('link', { name: /Pricing/i }).click();
await expect(page).toHaveURL(/pricing/i);
});
await test.step('Click Book Demo and interact with calendar in popup', async () => {
// Use AI actions to click Book Demo button where the copy changes frequently
const [popup] = await Promise.all([
page.context().waitForEvent('page'),
aiClick('Book Demo button', page)
]);
await popup.waitForLoadState('domcontentloaded');
await expect(popup).toHaveURL(/calendly/);
// Use AI to interact with 3rd party UI
await aiVerify('calendar or scheduling interface is visible', popup);
await aiClick('an available date slot in the calendar', popup);
await aiVerify('a date is selected or highlighted', popup);
});
});