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

test.describe("Popular Requests", () => {
  test("/ru/popular renders", async ({ page }) => {
    await page.goto("/ru/popular");
    await page.waitForLoadState("domcontentloaded");

    // The page should render without crashing. The PopularRequestsPanel
    // is lazy-loaded, so we wait for either the panel or the loading fallback.
    await expect(
      page.locator("main, [aria-busy='true'], body"),
    ).not.toBeEmpty();

    // URL should be correct
    expect(page.url()).toContain("/ru/popular");
  });
});
