mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
24 lines
719 B
TypeScript
24 lines
719 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test('should load the homepage', async ({ page }) => {
|
|
// Using baseURL from config
|
|
await page.goto('/');
|
|
|
|
const title = await page.title();
|
|
expect(title).toContain('Nut');
|
|
await expect(page.locator('header')).toBeVisible();
|
|
});
|
|
|
|
test('Create a project from a preset', async ({ page }) => {
|
|
// Using baseURL from config instead of hardcoded URL
|
|
await page.goto('/');
|
|
await page.getByRole('button', { name: 'Build a todo app in React' }).click();
|
|
await page
|
|
.locator('div')
|
|
.filter({ hasText: /^Build a todo app in React using Tailwind$/ })
|
|
.first()
|
|
.click();
|
|
|
|
await expect(page.locator('[data-testid="message"]')).toBeVisible();
|
|
});
|