auth
FreeAuthentication and authorization patterns for Rossoctl services
The English summary is being prepared. Showing the original description.
Write and review Playwright demo tests for Rossoctl - markStep segments, assertions, selectors, narration alignment
The English summary is being prepared. Showing the original description.
Run score Not tested
See how to installReview the instructions the agent will receive before you install.
Write Playwright tests for recording narrated demo videos of the Rossoctl platform.
playwright-demo before recordingSource tests: .worktrees/playwright-demos/local_experiments/e2e/<name>.spec.ts
Every Playwright demo test MUST have:
const stepTimestamps: { step: string; time: number }[] = [];
const demoStartTime = Date.now();
const markStep = (step: string) => {
const elapsed = (Date.now() - demoStartTime) / 1000;
stepTimestamps.push({ step, time: elapsed });
console.log(`[demo-ts] ${elapsed.toFixed(1)}s - ${step}`);
};
Copy injectCursor, humanMove, demoClick from existing tests. These
create a visible red cursor dot in the video (headless Playwright has no cursor).
markStep('section_name'); // MUST be outside any if/catch block
Rules:
[section] markers in narration file exactlyTests MUST fail if content doesn't load. Never use silent .catch(() => {}):
// REQUIRED after login
expect(page.url()).not.toContain('/realms/');
// REQUIRED after SPA navigation
await expect(page).toHaveURL(/\/agents/, { timeout: 10000 });
// REQUIRED before critical interaction
await expect(element).toBeVisible({ timeout: 5000 });
// REQUIRED after content load
expect(cardCount, 'Page should have cards').toBeGreaterThan(0);
Keep .catch() ONLY for truly optional elements:
Use sidebar clicks, NOT page.goto() — full reload loses Keycloak tokens:
// CORRECT - SPA client-side routing
const link = page.locator('nav a').filter({ hasText: /^Agents$/ });
await demoClick(link.first(), 'Agents sidebar');
// WRONG - loses auth tokens
await page.goto(`${UI_URL}/agents`);
Use page.goto() only for external apps (MLflow, Phoenix, Kiali).
Write at test end:
const fs = require('fs');
const path = require('path');
const scriptDir = process.env.PLAYWRIGHT_OUTPUT_DIR || path.join(__dirname, '..');
const tsFile = path.join(scriptDir, '..', '<name>-timestamps.json');
fs.writeFileSync(tsFile, JSON.stringify(stepTimestamps, null, 2));
Read UI source (rossoctl/ui-v2/src/pages/) to find correct selectors:
| UI Pattern | Playwright Selector |
|---|---|
| PatternFly Button | page.getByRole('button', { name: /text/i }) |
| PatternFly Tab | page.getByRole('tab', { name: /text/i }) |
| React Router Link | page.locator('nav a').filter({ hasText: /text/ }) |
| Aria label | page.locator('[aria-label="Select namespace"]') |
Button with onClick (not <a>) | page.getByRole('button', { name: /View Agents/i }) |
| PatternFly Card | page.locator('.pf-v5-c-card') |
Try multiple selectors with .or() for resilience:
const chatTab = page.getByRole('tab', { name: /Chat/i })
.or(page.locator('button:has-text("Chat")'))
.or(page.locator('.pf-v5-c-tabs__link:has-text("Chat")'));
Each test needs a matching narration file with one [section] per markStep():
[intro]
Welcome to the Kay-jentee platform...
[login]
We authenticate through Keycloak...
[section_name]
Description of what's visible on screen.
Pronunciation: Kay-jentee, A-to-A, M-C-P, mutual TLS, O-I-D-C.
Before recording, verify:
markStep() calls outside conditionalsexpect() assertion (not silent .catch())[section] markers 1:1page.goto())demoClick() used for cursor visibility (not .click())<name>-timestamps.json--no-narrationplaywright-demo:debugplaywright-demo for recording with voiceoverplaywright-demo -- Record videos (uses this skill's tests)playwright-demo:debug -- Fix failing selectors and authplaywright-research -- Analyze UI code for selectorstest:review -- General test quality review patternsNo reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Authentication and authorization patterns for Rossoctl services
The English summary is being prepared. Showing the original description.
Create confidential OAuth2 clients in Keycloak for server-to-service authentication
The English summary is being prepared. Showing the original description.
Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication
The English summary is being prepared. Showing the original description.
Configure OpenTelemetry Collector with OAuth2 authentication for trace export
The English summary is being prepared. Showing the original description.
CI pipeline monitoring, status checks, and PR validation workflows
The English summary is being prepared. Showing the original description.
Monitor running CI jobs, wait for completion, create tasks for results
The English summary is being prepared. Showing the original description.