FieldOps/e2e/tests/ping.spec.ts
2026-05-16 12:02:15 +01:00

19 lines
666 B
TypeScript

import { test, expect } from '@playwright/test';
test.describe('ping smoke', () => {
test('home page shows the seeded Demo Factory tenant', async ({ page }) => {
await page.goto('/');
// RSC card with the server-side ping result.
const success = page.getByTestId('ping-success');
await expect(success).toBeVisible({ timeout: 15_000 });
const tenant = page.getByTestId('tenant-name');
await expect(tenant).toHaveText('Demo Factory');
// Client-side hook hitting the same procedure via /api/trpc.
const clientTenant = page.getByTestId('ping-client-tenant');
await expect(clientTenant).toContainText('Demo Factory');
});
});