mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-09-01 21:27:58 +00:00
feat(fleet-secrets): graduate encrypted fleet-wide environment bundles to Community (#1758)
* feat(fleet-secrets): graduate encrypted fleet-wide environment bundles to Community * fix(fleet-secrets): update reachability test for Secrets community graduation * fix(fleet-secrets): address review findings * fix(fleet-secrets): add HTTP-level Community admin push/import tests and non-admin tab-hidden test
This commit is contained in:
@@ -90,19 +90,29 @@ describe('reachability', () => {
|
||||
expect(isViewHidden('audit-log', ctx({ isPaid: true, can: () => false }))).toBe(true);
|
||||
});
|
||||
|
||||
it('hides routing and secrets fleet tabs only after experimentalReady when off', () => {
|
||||
it('hides routing fleet tab only after experimentalReady when off; secrets always visible for admin', () => {
|
||||
const loading = ctx({ experimental: false, experimentalReady: false });
|
||||
expect(isFleetTabHidden('routing', loading)).toBe(false);
|
||||
expect(isFleetTabHidden('secrets', loading)).toBe(false);
|
||||
|
||||
const off = ctx({ experimental: false, experimentalReady: true });
|
||||
expect(isFleetTabHidden('routing', off)).toBe(true);
|
||||
expect(isFleetTabHidden('secrets', off)).toBe(true);
|
||||
expect(isFleetTabHidden('secrets', off)).toBe(false);
|
||||
expect(isFleetTabHidden('deployments', off)).toBe(false);
|
||||
expect(isFleetTabHidden('federation', off)).toBe(false);
|
||||
expect(isFleetTabHidden('actions', off)).toBe(false);
|
||||
});
|
||||
|
||||
it('hides secrets fleet tab for non-admin after authz ready', () => {
|
||||
// Cold load: permissions not ready, don't hide yet (deep link survives)
|
||||
const loading = ctx({ isAdmin: false, permissionsStatus: 'loading' });
|
||||
expect(isFleetTabHidden('secrets', loading)).toBe(false);
|
||||
|
||||
// Permissions settled: non-admin deep link normalizes to overview
|
||||
const ready = ctx({ isAdmin: false, permissionsStatus: 'ready' });
|
||||
expect(isFleetTabHidden('secrets', ready)).toBe(true);
|
||||
});
|
||||
|
||||
it('does not hide fleet-mesh settings for experimental off', () => {
|
||||
const off = ctx({ experimental: false, experimentalReady: true,
|
||||
scheduledOpsAccessible: false, isAdmin: true });
|
||||
|
||||
Reference in New Issue
Block a user