Initial commit: Brachnha Insight project setup
- Next.js 14+ with App Router and TypeScript - Tailwind CSS and ShadCN UI styling - Zustand state management - Dexie.js for IndexedDB (local-first data) - Auth.js v5 for authentication - BMAD framework integration Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
tests/e2e/example.spec.ts
Normal file
28
tests/e2e/example.spec.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { test, expect } from '../support/fixtures';
|
||||
|
||||
test.describe('Example Test Suite', () => {
|
||||
test('should load homepage', async ({ page }) => {
|
||||
// Navigating to the base URL
|
||||
await page.goto('/');
|
||||
|
||||
// Check that we're on the right page
|
||||
// Note: Adjust the title expectation to match your actual app title
|
||||
await expect(page).toHaveTitle(/Test01/i);
|
||||
|
||||
// Example of using data-testid selector (preferred)
|
||||
// await expect(page.getByTestId('main-container')).toBeVisible();
|
||||
});
|
||||
|
||||
test('should create valid user data using factory', async ({ userFactory }) => {
|
||||
// This demonstrates using the factory to generate data
|
||||
// Even though we don't login yet, it proves the factory works
|
||||
const user = await userFactory.createUser();
|
||||
|
||||
expect(user.email).toBeTruthy();
|
||||
expect(user.email).toContain('@');
|
||||
expect(user.password).toBeTruthy();
|
||||
|
||||
// Console log to debug (remove in real tests)
|
||||
console.log('Generated test user:', user.name);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user