mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
21 lines
882 B
TypeScript
21 lines
882 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Statistics page', () => {
|
|
test('statistics section shows data', async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(page.getByRole('status', { name: 'Radio OK' })).toBeVisible();
|
|
|
|
// Open settings
|
|
await page.getByText('Settings').click();
|
|
|
|
// Click the Statistics section
|
|
await page.getByRole('button', { name: /Statistics/i }).click();
|
|
|
|
// Verify section headings/labels are visible (use heading role or exact match to avoid ambiguity)
|
|
await expect(page.locator('h4').getByText('Network')).toBeVisible({ timeout: 10_000 });
|
|
await expect(page.getByText('Contacts', { exact: true }).first()).toBeVisible();
|
|
await expect(page.getByText('Channels', { exact: true }).first()).toBeVisible();
|
|
await expect(page.locator('h4').getByText('Packets')).toBeVisible();
|
|
});
|
|
});
|