feat: add frontend e2e coverage

This commit is contained in:
a.tolmachev
2026-04-05 22:22:44 +03:00
parent d33c52d51d
commit 0bd47d9944
18 changed files with 623 additions and 7 deletions
+16
View File
@@ -0,0 +1,16 @@
const { test, expect } = require('@playwright/test');
const { login, localized } = require('./helpers');
test('logs and usage pages show seeded data', async ({ page }) => {
await login(page);
await page.goto('/logs');
await expect(page.locator('.page-title')).toHaveText(localized('Logs', 'Логи'));
await expect(page.locator('#log-list')).toBeVisible();
await expect(page.locator('#log-list').locator('.empty-state, .log-entry, .log-row, .log-item').first()).toBeVisible();
await page.goto('/usage');
await expect(page.locator('.page-title')).toHaveText(localized('Usage', 'Использование'));
await expect(page.locator('#chart-bars .chart-col')).toHaveCount(7);
await expect(page.locator('#usage-tbody tr')).toHaveCount(3);
});