feat(new): enforce social publishing governance

Amp-Thread-ID: https://ampcode.com/threads/T-019e55df-9bcd-73e6-9935-c1e6238cd273
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
ZacharyZhang-NYandAmp committed 2026-05-23 14:18:34 -04:00
1 parent 8a1389bcbc
commit 6d99f515c7
10 files changed
+643 -141

No files matched your search

@@ -61,6 +61,30 @@ test("onboards, hires, and creates work in the Electron shell", async () => {
await page.getByRole("button", { name: "Send" }).click();
await expect(page.getByText("Release channel opened.")).toBeVisible();
await page.getByRole("button", { name: "Social" }).click();
await page.getByRole("button", { name: "Connect account" }).click();
await page.getByLabel("Handle").fill("@acme");
await page.getByLabel("Display name").fill("Acme Social");
await page.locator(".modal").getByRole("button", { name: "Connect" }).click();
await expect(page.getByText("@acme").first()).toBeVisible();
await page.getByRole("button", { name: "Draft post" }).click();
await page.getByLabel("Body").fill("Pilot starts Friday.");
await page.getByLabel("Scheduled for").fill("2027-01-15T09:30");
await page.locator(".modal").getByRole("button", { name: "Save" }).click();
await expect(page.getByText("Draft").first()).toBeVisible();
await page.getByRole("button", { name: "Schedule" }).click();
await expect(page.getByText("Awaiting approval").first()).toBeVisible();
await expect(page.getByRole("button", { name: "Publish" })).toBeDisabled();
await page.getByRole("button", { name: "Approvals" }).click();
await expect(page.getByText("Approve social post").first()).toBeVisible();
await page.getByLabel("Filter risk").selectOption("medium");
await page.getByRole("button", { name: /^Approve$/ }).first().click();
await page.getByRole("button", { name: "Social" }).click();
await expect(page.getByText("Approved").first()).toBeVisible();
await page.getByRole("button", { name: "Publish" }).click();
await expect(page.getByText("Published").first()).toBeVisible();
await verifyPagesDoNotOverflow(page);
} finally {
await app.close();