Files
qbit-authentik/scripts/Smoke-Access-UI.cjs
james.maesandGPT-6 2e356b8117
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / Scoped workflow [workflow f1d46718955078331817c6206b822a94bc7d769f] (pull_request) Successful in 9s
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 9s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / original-voyage (pull_request) Skipped
QRun-IO/ci-policy: ci / original-cli (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: ci / shared-pipeline (pull_request) Skipped
Shared Java Maven CI with Docker / secrets (push) Successful in 38s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / secrets (pull_request) Successful in 38s
qbit release candidate / cut-rc (pull_request) Failing after 18s
Release candidate / release-rc (pull_request) Failing after 18s
qbit release candidate / tag-and-release (pull_request) Skipped
QRun-IO/ci-policy: Shared Java Maven CI with Docker / verify (pull_request) Failing after 15m39s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / gate (pull_request) Failing after 24s
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Failing after 1h14m34s
QRun-IO/ci-policy: ci / ci-result (pull_request) Failing after 10s
Shared Java Maven CI with Docker / verify (push) Failing after 17m19s
Shared Java Maven CI with Docker / gate (push) Failing after 24s
qrun-release / release (push) Failing after 1h16m30s
qrun-release / postpublish (push) Skipped
feat(authentik): checkpoint application access and identity synchronization RC
Add user and group QQQ application-role access editing, bounded catalogs,
webhook inbox and SQL mirrors, refreshed session permissions, and deferred
invitation assignments. Include the isolated local review host, browser
acceptance scripts, documentation and the token-widget column mapping fix.

User approved this RC checkpoint. Full 1.0 gates remain documented, including
the schema-drift matcher and PostgreSQL integration errors from the full gate.
Companion UI: QRun-IO/qqq-frontend-next#205.

Co-Authored-By: GPT-6 <noreply@openai.com>
2026-11-05 05:29:54 -06:00

61 lines
3.3 KiB
JavaScript

/* Copyright 2026 Kingsrook, LLC. Licensed under the Apache License, Version 2.0. */
/**
* Live local-review smoke test. Uses the actual QQQ backend, without API mocks.
* Requires the access UI's installed @playwright/test and Chromium browser.
* Opens the synthetic review user, filters the permission matrix, toggles a
* draft grant and cancels. Never executes a permission change.
* Run: node scripts/Smoke-Access-UI.cjs
*/
const path = require('node:path');
const { createRequire } = require('node:module');
const frontend = process.env.QBIT_REVIEW_FRONTEND || path.join(process.env.USERPROFILE, '.cache', 'qqq-authentik-access-ui');
const { chromium, expect } = createRequire(path.join(frontend, 'package.json'))('@playwright/test');
const baseURL = process.env.QBIT_REVIEW_UI_URL || 'http://127.0.0.1:18301';
/** Check rendered controls and draft selection without persisting changes. */
async function main()
{
const browser = await chromium.launch({ headless: true });
try
{
const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
page.setDefaultTimeout(20000);
page.setDefaultNavigationTimeout(20000);
await page.goto(baseURL + '/app/authentik_user');
await page.getByText('review.sam', { exact: true }).first().click();
await page.waitForURL(/\/authentik_user\/\d+\/?$/);
await page.getByRole('button', { name: 'Record actions menu', exact: true }).click();
await page.getByText('Edit User Permissions', { exact: true }).click();
const matrix = page.locator('[data-qqq-id="access-permission-matrix"]');
await expect(matrix).toBeVisible();
await expect(matrix.getByRole('checkbox').first()).toBeVisible();
await expect(matrix.getByRole('alert')).toHaveCount(0);
await matrix.getByLabel('Search permissions or resources', { exact: true }).fill('review_document');
const read = matrix.getByRole('checkbox', { name: 'review_document.read', exact: true });
await expect(read).toBeEnabled();
const wasChecked = await read.isChecked();
await read.setChecked(!wasChecked);
await expect(read).toBeChecked({ checked: !wasChecked });
await page.screenshot({ path: 'target/release-access-ui-catalog.png', fullPage: true });
await matrix.getByLabel('Show', { exact: true }).selectOption('selected');
if(!wasChecked)
{
await expect(matrix.getByRole('checkbox', { name: 'review_document.read', exact: true })).toBeChecked();
}
await matrix.getByLabel('Show', { exact: true }).selectOption('inherited');
await matrix.getByLabel('Search permissions or resources', { exact: true }).fill('');
await expect(matrix.getByText(/authentik\.users\.read\.hasAccess.*Review Readers/)).toBeVisible();
await expect(matrix.getByText('Inherited grants must be changed at their source. Policy grants use Edit Policy.')).toBeVisible();
await page.screenshot({ path: 'target/release-access-ui-smoke.png', fullPage: true });
await page.getByRole('button', { name: 'Cancel', exact: true }).click();
console.log('PASS: live permission catalog, resource search, draft checkbox, selection view, inherited-source view and cancel. No changes executed.');
}
finally
{
await browser.close();
}
}
main().catch(error => { console.error(error.message); process.exitCode = 1; });