mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
simplify the e2e tests
This commit is contained in:
43
apps/ui/tests/profiles/profiles-crud.spec.ts
Normal file
43
apps/ui/tests/profiles/profiles-crud.spec.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* AI Profiles E2E Test
|
||||
*
|
||||
* Happy path: Create a new profile
|
||||
*/
|
||||
|
||||
import { test, expect } from '@playwright/test';
|
||||
import {
|
||||
setupMockProjectWithProfiles,
|
||||
waitForNetworkIdle,
|
||||
navigateToProfiles,
|
||||
clickNewProfileButton,
|
||||
fillProfileForm,
|
||||
saveProfile,
|
||||
waitForSuccessToast,
|
||||
countCustomProfiles,
|
||||
} from '../utils';
|
||||
|
||||
test.describe('AI Profiles', () => {
|
||||
test('should create a new profile', async ({ page }) => {
|
||||
await setupMockProjectWithProfiles(page, { customProfilesCount: 0 });
|
||||
await page.goto('/');
|
||||
await waitForNetworkIdle(page);
|
||||
await navigateToProfiles(page);
|
||||
|
||||
await clickNewProfileButton(page);
|
||||
|
||||
await fillProfileForm(page, {
|
||||
name: 'Test Profile',
|
||||
description: 'A test profile',
|
||||
icon: 'Brain',
|
||||
model: 'sonnet',
|
||||
thinkingLevel: 'medium',
|
||||
});
|
||||
|
||||
await saveProfile(page);
|
||||
|
||||
await waitForSuccessToast(page, 'Profile created');
|
||||
|
||||
const customCount = await countCustomProfiles(page);
|
||||
expect(customCount).toBe(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user