Enforce customer boundaries on token administration and finalize fleet navigation
This commit is contained in:
@@ -62,6 +62,8 @@ function checkAction(p, expected) {
|
||||
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
|
||||
if (expected.phase === 'prepare') {
|
||||
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(expected.request.action);
|
||||
await page.getByLabel('Aktionsparameter', { exact: true }).fill(JSON.stringify(expected.request.parameters));
|
||||
await page.getByLabel('Ausführungsidentität', { exact: true }).selectOption('root');
|
||||
@@ -83,7 +85,9 @@ function checkAction(p, expected) {
|
||||
assert(path.dirname(path.resolve(expected.output_file)) === path.dirname(file));
|
||||
fs.writeFileSync(expected.output_file, JSON.stringify({ plan, operation }), { flag: 'wx', mode: 0o600 });
|
||||
} else {
|
||||
assert(expected.phase === 'approve'); await page.getByRole('button', { name: expected.operation_id, exact: true }).click();
|
||||
assert(expected.phase === 'approve');
|
||||
await page.getByRole('link', { name: 'Aufträge', exact: true }).click();
|
||||
await page.getByRole('button', { name: expected.operation_id, exact: true }).click();
|
||||
const op = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Antrag / Ausführung ' + expected.operation_id, exact: true }) });
|
||||
const pending = JSON.parse(await op.locator('pre').first().innerText());
|
||||
assert(pending.approval_state === 'pending_approval' && pending.job_count === 0 && pending.execution_state === null);
|
||||
|
||||
Reference in New Issue
Block a user