feat(admin): E2E content/system mock-сьюты, row testids, IFT smoke. Refs EventHub/EventHubFrontAdmin#33 #37 #38 #39

This commit is contained in:
2026-07-14 22:44:22 +03:00
parent a3468518b3
commit 836e4a7eea
23 changed files with 831 additions and 223 deletions
+50
View File
@@ -0,0 +1,50 @@
import { test, expect } from '@playwright/test';
import { seedAuthenticatedSession } from '../helpers/session';
test.describe('content explore (mock)', () => {
test.beforeEach(async ({ page }) => {
await seedAuthenticatedSession(page);
});
test('users: список, поиск, detail', async ({ page }) => {
await page.goto('/users');
await expect(page.getByTestId('page-users')).toBeVisible();
await expect(page.getByTestId('row-user-e2e-1')).toBeVisible();
await page.getByTestId('filter-users-search-input').fill('Alice');
await page.getByTestId('filter-users-search').locator('button[type="submit"]').click();
await expect(page.getByTestId('row-user-e2e-1')).toBeVisible();
await page.goto('/users/user-e2e-1');
await expect(page.getByTestId('page-user-detail')).toBeVisible();
});
test('calendars: список и detail', async ({ page }) => {
await page.goto('/calendars');
await expect(page.getByTestId('page-calendars')).toBeVisible();
await expect(page.getByTestId('row-cal-e2e-1')).toBeVisible();
await page.goto('/calendars/cal-e2e-1');
await expect(page.getByTestId('page-calendar-detail')).toBeVisible();
});
test('events: список и detail', async ({ page }) => {
await page.goto('/events');
await expect(page.getByTestId('page-events')).toBeVisible();
await expect(page.getByTestId('row-evt-e2e-1')).toBeVisible();
await page.goto('/events/evt-e2e-1');
await expect(page.getByTestId('page-event-detail')).toBeVisible();
});
test('subscriptions: список', async ({ page }) => {
await page.goto('/subscriptions');
await expect(page.getByTestId('page-subscriptions')).toBeVisible();
await expect(page.getByTestId('row-sub-e2e-1')).toBeVisible();
});
test('banned-words: список и add', async ({ page }) => {
await page.goto('/banned-words');
await expect(page.getByTestId('page-banned-words')).toBeVisible();
await expect(page.getByTestId('row-spamword')).toBeVisible();
await page.getByTestId('input-banned-word').fill('newbad');
await page.getByTestId('btn-add-banned-word').click();
await expect(page.getByTestId('row-newbad')).toBeVisible();
});
});