test: prove actual UI revocation prevents start within the original valid window
Rust development slice / linux (push) Failing after 7s

This commit is contained in:
2026-11-13 21:12:57 +01:00
parent 6715add024
commit 0db3adeecf
4 changed files with 54 additions and 1 deletions
+5 -1
View File
@@ -69,8 +69,12 @@ function counterScript(id) {
const nonce = await control.locator('code').innerText();
await control.getByLabel('Bestätigungskennung eingeben', { exact: true }).fill(nonce);
await control.getByRole('checkbox', { name: 'Ich bestätige diese konkrete administrative Wirkung ausdrücklich.' }).check();
const revokedResponse = page.waitForResponse(r => new URL(r.url()).pathname.endsWith('/operation-plans/' + plan.plan_id + '/revocation') && r.request().method() === 'POST' && r.status() === 200);
await control.getByRole('button', { name: 'Planberechtigung widerrufen · ausdrücklich ausführen', exact: true }).click();
await control.locator('pre').filter({ hasText: '"approval_state": "revoked"' }).waitFor();
// The parent reload remounts AdminControl and can clear its transient
// success <pre>. Observe the actual UI request, never repeat its click.
const revoked = await (await revokedResponse).json();
assert(revoked.operation_id === expected.operation_id && revoked.approval_state === 'revoked');
assert(approvals === 0 && revocations === 1);
}
await page.getByRole('button', { name: 'Abmelden', exact: true }).click();