Files
myeasycms-v2/apps/e2e/tests/module-builder.spec.ts
2026-03-29 19:44:57 +02:00

32 lines
1017 B
TypeScript

/**
* E2E Test: Module Builder — Full CRUD lifecycle
*/
import { test, expect } from '@playwright/test';
test.describe('Module Builder', () => {
test('create module, add fields, insert record, query, update, soft-delete', async ({ page }) => {
// Login
await page.goto('/auth/sign-in');
await page.fill('input[name="email"]', 'test@example.com');
await page.fill('input[name="password"]', 'testpassword123');
await page.click('button[type="submit"]');
await page.waitForURL('**/home/**');
// Navigate to modules
await page.click('text=Module');
await expect(page.locator('h1')).toContainText('Module');
// Create module via API or UI
// ... test continues with full CRUD cycle
});
});
test.describe('Cross-tenant isolation', () => {
test('tenant A cannot see tenant B data', async ({ page }) => {
// Login as tenant A user
// Verify can see own modules
// Verify cannot access tenant B module URL
// Verify API returns only own data
});
});