meal categories
ci/woodpecker/push/e2e Pipeline was successful
ci/woodpecker/push/fmt Pipeline failed
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
2026-08-03 21:29:33 -04:00
parent cf6853d71e
commit 3695fc68d6
11 changed files with 680 additions and 67 deletions
+9 -1
View File
@@ -11,9 +11,17 @@ export async function registerAndLogin(page: Page, email: string) {
}
/** Creates a meal with the given name and markdown description. */
export async function createMeal(page: Page, name: string, description: string) {
export async function createMeal(
page: Page,
name: string,
description: string,
category?: string,
) {
await page.goto("/meals/new");
await page.fill("#meal-name", name);
if (category) {
await page.selectOption("#meal-category", { label: category });
}
await page.fill("#meal-description", description);
await page.click('button:has-text("Save meal")');
await expect(page).toHaveURL(/\/meals\/\d+/);