feat: record the warmup filtering proof flow with its tour-finishing fixture and give the Settings > Sending hide-warmup switch an accessible name

This commit is contained in:
Matthew Meszaros
2026-11-09 20:29:28 +01:00
parent a6e09c46ec
commit 040ebf3ead
4 changed files with 70 additions and 0 deletions
+14
View File
@@ -336,6 +336,20 @@ QA_WARMUP_PLACEMENT_FIXTURES=1 pnpm proof warmup-placement
The placement numbers are fixture data, not a measurement of real delivery.
## Warmup filtering proof fixtures
`flows/warmup-filtering.flow.ts` is opt-in: apply `fixtures/warmup-filtering.sql`
to this worktree's rich-seed database. It marks the owner's product tour
finished, clears the workspace's `external_warmup` settings and the seeded
`dev.outbound@warmbly.test` filter tag, so the walkthrough starts from the
defaults. It is re-runnable. Clear the stack's private Redis afterwards.
```bash
docker exec -i warmbly-postgres-1 psql -U warmbly -d warmbly_qa_<worktree> < fixtures/warmup-filtering.sql
docker exec wqa-<worktree>-redis redis-cli FLUSHDB
QA_WARMUP_FILTERING_FIXTURES=1 pnpm proof warmup-filtering
```
## Regions and timezones proof fixtures
`flows/regions-and-timezones.flow.ts` is opt-in: apply `fixtures/regions-and-timezones.sql`
+7
View File
@@ -0,0 +1,7 @@
-- The product tour would cover the page; the flow records warmup filtering, not the tour.
UPDATE users SET product_tour_completed_at = now()
WHERE id = '11111111-0000-0000-0000-000000000001' AND product_tour_completed_at IS NULL;
-- Start from the defaults so the walkthrough shows both settings turning on.
UPDATE outreach_settings SET settings = settings - 'external_warmup'
WHERE organization_id IN (SELECT organization_id FROM users u JOIN organization_members m ON m.user_id = u.id WHERE u.id = '11111111-0000-0000-0000-000000000001');
UPDATE email_accounts SET warmup_filter_tag = NULL WHERE email = 'dev.outbound@warmbly.test';
+48
View File
@@ -0,0 +1,48 @@
import { expect, test } from "../lib/proof.ts";
test.skip(process.env.QA_WARMUP_FILTERING_FIXTURES !== "1", "Apply qa/fixtures/warmup-filtering.sql to this stack's rich-seed database, clear its Redis and set QA_WARMUP_FILTERING_FIXTURES=1.");
test("hide warmup sent by other services from the inbox", async ({ page, proof }) => {
await page.goto("/app/settings/sending");
const section = page.getByText("Warmup from other services", { exact: true });
await section.scrollIntoViewIfNeeded();
const marker = page.getByRole("switch", { name: "Hide warmup from another Warmbly" });
await expect(marker).toHaveAttribute("aria-checked", "false");
await proof.chapter("Warmup from other services", "Off by default: nothing is hidden until the workspace asks");
await proof.shot("external-warmup-off", { caption: "The new section under Settings > Sending, off by default." });
await marker.click();
await expect(marker).toHaveAttribute("aria-checked", "true");
const field = page.getByPlaceholder("Paste a warmup tag");
await field.pressSequentially("re", { delay: 60 });
await expect(page.getByText(/Use at least 4 characters/)).toBeVisible();
await proof.shot("external-warmup-short-tag", { caption: "A tag too short to be specific is explained before saving." });
await field.fill("");
await field.pressSequentially("wrm-7q2x", { delay: 60 });
const saved = page.waitForResponse((r) => r.url().includes("/outreach/settings") && r.request().method() !== "GET" && (r.request().postData() ?? "").includes("wrm-7q2x"));
await page.getByRole("button", { name: "Add", exact: true }).click();
await expect(page.getByRole("button", { name: "Remove wrm-7q2x" })).toBeVisible();
expect((await saved).ok()).toBe(true);
await proof.shot("external-warmup-on", { caption: "Another Warmbly's warmup and a tool's warmup tag are now kept out of the inbox." });
});
test("turn on a warmup filter tag for one mailbox", async ({ page, proof }) => {
await page.goto("/app/emails");
await page.getByRole("row", { name: /dev\.outbound@warmbly\.test/ }).getByText("dev.outbound@warmbly.test", { exact: true }).click();
await page.getByRole("button", { name: "Warmup", exact: true }).click();
const toggle = page.getByRole("switch", { name: "Add a filter tag to warmup mail this mailbox receives" });
await toggle.scrollIntoViewIfNeeded();
await expect(toggle).toHaveAttribute("aria-checked", "false");
await proof.chapter("Filter tag", "Opt-in, per mailbox: a code on every warmup email it receives");
await proof.shot("filter-tag-off", { caption: "Off by default, below where warmup mail is filed." });
await toggle.click();
await expect(toggle).toHaveAttribute("aria-checked", "true");
await expect(page.getByText(/^[a-z2-9]{4}-[a-z2-9]{4}-[a-z2-9]{4}$/)).toBeVisible();
await expect(page.getByText(/add a rule for mail whose body contains|In Gmail, search for|In Outlook, add a rule/)).toBeVisible();
await proof.shot("filter-tag-on", { caption: "A random code with copy, a new-code action and filter steps for the mailbox's provider.", ignore: [page.getByText(/^[a-z2-9]{4}-[a-z2-9]{4}-[a-z2-9]{4}$/)] });
await toggle.click();
await expect(toggle).toHaveAttribute("aria-checked", "false");
});
@@ -548,6 +548,7 @@ function SendingSettings() {
<Toggle
on={externalWarmup.hide_warmbly_marked}
onChange={(on) => patchExternalWarmup({ hide_warmbly_marked: on })}
label="Hide warmup from another Warmbly"
/>
</Row>
<Row