Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: 'claude'
allowed_bots: "claude"
show_full_output: true
prompt: |
Review PR #${{ github.event.pull_request.number }} in ${{ github.repository }}
Expand Down
18 changes: 11 additions & 7 deletions tests/measurement.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from "@playwright/test";
import { expect, test, type Route } from "@playwright/test";
import { mkdtempSync, writeFileSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
Expand Down Expand Up @@ -86,7 +86,8 @@ test("openings, repeats and both available surfaces count once per visit", async
),
)
.toBe(true);
await page.route("**/api/resolve-birth", (route) => route.abort());
const abortResolver = (route: Route) => route.abort();
await page.route("**/api/resolve-birth", abortResolver);
await page.getByRole("button", { name: "Edit birth details" }).click();
await page
.getByLabel("Birth details")
Expand All @@ -96,11 +97,7 @@ test("openings, repeats and both available surfaces count once per visit", async
events.some((e) => e.event === "failure" && e.system === "Vedic"),
)
.toBe(true);
await page.unrouteAll({ behavior: "wait" });
await page.route("**/api/measurement", async (route) => {
events.push(route.request().postDataJSON());
await route.fulfill({ status: 204 });
});
await page.unroute("**/api/resolve-birth", abortResolver);
await page.reload();
await page.getByLabel("Birth details").fill("June 21, 2000 at 1pm in London");
await page.getByRole("button", { name: "Apply" }).click();
Expand All @@ -110,6 +107,13 @@ test("openings, repeats and both available surfaces count once per visit", async
await expect
.poll(() => events.filter((e) => e.event === "eligible").length)
.toBe(2);
expect(
new Set(
events
.filter((event) => event.event === "eligible")
.map((event) => event.visitId),
).size,
).toBe(2);
const folder = mkdtempSync(join(tmpdir(), "measurement-test-"));
try {
const file = join(folder, "synthetic.json");
Expand Down
Loading