/ opencodehub / tests / e2e / pull-requests.spec.ts
Swadhin Biswas test(qa): add e2e, integration, unit, and load coverage · 3/6/2026
1c29e63
23 lines · 637 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { expect, test } from "@playwright/test";

test.describe("Pull Requests", () => {
  test("PR list page pattern exists", async ({ page }) => {
    await page.goto("/explore");
    await expect(page.locator("body")).toBeVisible();
  });

  test("PR creation requires auth", async ({ page }) => {
    await page.goto("/test/test-repo/compare");
    const url = page.url();
    // Should redirect to login or show 404
    expect(
      url.includes("/login") ||
        url.includes("404") ||
        (await page
          .locator("text=not found")
          .isVisible()
          .catch(() => true)),
    ).toBeTruthy();
  });
});