import { Page, expect } from "@playwright/test";

/**
 * Navigate to the journal page using bottom navigation
 */
export default async function goToJournal(page: Page): Promise<void> {
  await page.getByRole("button", { name: "Журнал" }).click();

  // Wait for journal to load by checking for meal sections
  // Use .first() since there are multiple "Завтрак" elements (one for each day)
  await expect(page.getByText("Завтрак").first()).toBeVisible();
}
