fix(gateway): restore current scenario selection

This commit is contained in:
2026-08-09 12:43:46 +00:00
parent 4d4c773a5e
commit fe678b295b
5 changed files with 134 additions and 19 deletions
@@ -326,6 +326,24 @@ describe('admin profile navigation API', () => {
});
});
describe('admin scenario catalog API', () => {
it('marks scenario zero as the current selectable scenario', async () => {
const harness = await buildCaller(
async () => {
throw new Error('not used');
},
{ profileScenario: '0' }
);
const scenarios = await harness.caller.admin.profiles.listScenarios({
profileName: 'che:2',
sourceMode: 'CURRENT',
});
expect(scenarios.find((scenario) => scenario.id === 0)?.isCurrent).toBe(true);
});
});
describe('gateway notice API', () => {
const dirtyNotice =
'<b>점검</b><br><script>globalThis.__noticeXss=1</script>' +