feat(gating): reserve transaction splits for the Base edition #452

Merged
maximus merged 3 commits from issue-369-split-base-edition into main 2026-10-17 11:40:14 +00:00
Showing only changes of commit d5d0e89d2c - Show all commits

View file

@ -119,15 +119,24 @@ describe("TransactionTable — the Répartition button's wiring (#369)", () => {
expect(upsells(opened)).toHaveLength(0);
});
// One click arms one window: an edition change never brings up the other one.
it("an open split window survives a license refresh and closes once the edition is Free", () => {
(splitButtons(render("open"))[0].props.onOpenSplit as () => void)();
expect(splitWindows(render("pending"))).toHaveLength(1);
expect(splitWindows(render("locked"))).toHaveLength(0);
const refreshing = render("pending");
expect(splitWindows(refreshing)).toHaveLength(1);
expect(upsells(refreshing)).toHaveLength(0);
const downgraded = render("locked");
expect(splitWindows(downgraded)).toHaveLength(0);
expect(upsells(downgraded)).toHaveLength(0);
});
it("an open upsell survives a license refresh and goes away once the edition is Base", () => {
(splitButtons(render("locked"))[0].props.onOpenUpsell as () => void)();
expect(upsells(render("pending"))).toHaveLength(1);
expect(upsells(render("open"))).toHaveLength(0);
const refreshing = render("pending");
expect(upsells(refreshing)).toHaveLength(1);
expect(splitWindows(refreshing)).toHaveLength(0);
const upgraded = render("open");
expect(upsells(upgraded)).toHaveLength(0);
expect(splitWindows(upgraded)).toHaveLength(0);
});
});