mirror of
https://github.com/sstent/foodplanner.git
synced 2026-02-18 08:45:24 +00:00
feat(tracker): Add Calcium display to Daily Totals
This commit is contained in:
15
tests/calcium_display.spec.js
Normal file
15
tests/calcium_display.spec.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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$/);
|
||||
});
|
||||
Reference in New Issue
Block a user