Enforce customer boundaries on token administration and finalize fleet navigation

This commit is contained in:
2026-11-17 22:05:44 +01:00
parent 0afaca1d64
commit 312da6f39e
25 changed files with 1207 additions and 208 deletions
+5 -1
View File
@@ -43,7 +43,8 @@ function checkPlan(plan, expected) {
assert(session.testsimulation === true && session.approval_origin === 'dev_test_browser_simulation'
&& session.principal === expected.expected_principal);
await page.getByRole('status').filter({ hasText: 'SIMULIERT' }).waitFor();
assert(await page.getByLabel('Mandant', { exact: true }).inputValue() === expected.tenant_id);
await page.getByLabel('Kunde', { exact: true }).selectOption(expected.tenant_id);
assert(await page.getByLabel('Kunde', { exact: true }).inputValue() === expected.tenant_id);
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
if (expected.phase === 'prepare') {
const request = expected.request;
@@ -52,6 +53,8 @@ function checkPlan(plan, expected) {
&& equal(request.parameters, { reason, dependency_group: 'single-test-vm', reconnect_timeout_seconds: 180,
execution_identity: 'root', timeout_seconds: 240, max_output_bytes: 65536 }));
await page.getByRole('checkbox', { name: 'Ziel ' + expected.asset_id, exact: true }).check();
await page.getByRole('link', { name: 'Aufträge', exact: true }).click();
await page.getByRole('link', { name: 'Auftrag planen', exact: true }).click();
await page.getByLabel('Aktion', { exact: true }).selectOption('reboot');
await page.getByLabel('Aktionsparameter', { exact: true }).fill(JSON.stringify(request.parameters));
await page.getByLabel('Ausführungsidentität', { exact: true }).selectOption('root');
@@ -71,6 +74,7 @@ function checkPlan(plan, expected) {
assert(path.dirname(path.resolve(expected.output_file)) === path.dirname(file));
fs.writeFileSync(expected.output_file, JSON.stringify({ plan, operation: pending }), { flag: 'wx', mode: 0o600 });
} else {
await page.getByRole('link', { name: 'Aufträge', exact: true }).click();
await page.getByRole('button', { name: expected.operation_id, exact: true }).click();
const operation = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Antrag / Ausführung ' + expected.operation_id, exact: true }) });
const pending = JSON.parse(await operation.locator('pre').first().innerText());