mirror of
https://github.com/sstent/foodplanner.git
synced 2026-02-17 16:25:24 +00:00
16 lines
572 B
JavaScript
16 lines
572 B
JavaScript
const { test, expect } = require('@playwright/test');
|
|
|
|
test('should display Calcium in Daily Totals section', async ({ page }) => {
|
|
// Navigate to tracker page
|
|
await page.goto('/tracker');
|
|
|
|
// Check for Daily Totals card
|
|
const dailyTotalsCard = page.locator('.card:has-text("Daily Totals")');
|
|
await expect(dailyTotalsCard).toBeVisible();
|
|
|
|
// Check for Calcium label and value using test-id
|
|
const calciumValue = page.getByTestId('daily-calcium-value');
|
|
await expect(calciumValue).toBeVisible();
|
|
await expect(calciumValue).toContainText(/^[0-9]+mg$/);
|
|
});
|