auth
免费Authentication and authorization patterns for Rossoctl services
中文简介正在准备中。当前显示原文说明。
Write and review Playwright demo tests for Rossoctl - markStep segments, assertions, selectors, narration alignment
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
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 patterns还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Authentication and authorization patterns for Rossoctl services
中文简介正在准备中。当前显示原文说明。
Create confidential OAuth2 clients in Keycloak for server-to-service authentication
中文简介正在准备中。当前显示原文说明。
Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication
中文简介正在准备中。当前显示原文说明。
Configure OpenTelemetry Collector with OAuth2 authentication for trace export
中文简介正在准备中。当前显示原文说明。
CI pipeline monitoring, status checks, and PR validation workflows
中文简介正在准备中。当前显示原文说明。
Monitor running CI jobs, wait for completion, create tasks for results
中文简介正在准备中。当前显示原文说明。