fix(deploy): selective compose recreate on Save and Deploy (#1565) (#1568)

* feat: move core Blueprint orchestration to Community tier

Blueprints CRUD, reconciliation, and drift modes are now available on
Community. Pin remains Admiral-only via Federation placement controls.

* test: update NodeCard cordon tests for Admiral-only tier gate

Cordon now requires both isPaid and node:manage permission, matching the
backend requirePaid + requirePermission guard. Three tests still used
isPaid:false but expected the menu to be visible.
This commit is contained in:
Anso
2026-07-05 21:55:32 -04:00
committed by GitHub
parent adcc27e2cf
commit b3bc223c45
5 changed files with 175 additions and 58 deletions
@@ -61,6 +61,13 @@ describe('NodeCard', () => {
expect(screen.queryByRole('button', { name: 'Node actions' })).not.toBeInTheDocument();
});
it('hides the actions menu for a Community admin with node:manage when cordon requires Admiral', () => {
useLicenseMock.mockReturnValue({ isPaid: false });
render(<NodeCard {...baseProps(onlineNode())} />);
// Cordon is Admiral-only; without edit/delete props, no menu items are available to Community.
expect(screen.queryByRole('button', { name: 'Node actions' })).not.toBeInTheDocument();
});
it('exposes the actions menu (cordon entry point) for a paid admin', () => {
useLicenseMock.mockReturnValue({ isPaid: true });
render(<NodeCard {...baseProps(onlineNode())} />);
@@ -69,7 +76,7 @@ describe('NodeCard', () => {
expect(screen.getByRole('button', { name: 'Node actions' })).toBeInTheDocument();
});
it('exposes the cordon control for a node-admin via the node:manage permission', async () => {
it('exposes the cordon control for an Admiral node-admin via the node:manage permission', async () => {
const can = vi.fn((action: string) => action === 'node:manage');
useAuthMock.mockReturnValue({ isAdmin: false, can });
useLicenseMock.mockReturnValue({ isPaid: true });