lablup / lablup/backend.ai-webui

feat(WebUI Smoke CLI): implement runner with tag filter and external endpoint support

Open
#7,381 0 comments 0 reactions 0 assignees View on GitHub
mvp
Dominant language
TypeScript
Stars
133
Forks
81
Avg merge
1d 11h
Merged PRs (30d)
344

Description

## Parent

- Epic: [FR-2871](https://lablup.atlassian.net/browse/FR-2871)
- Spec Task: [FR-2872](https://lablup.atlassian.net/browse/FR-2872)
- Spec: `.specs/FR-2871-webui-smoke-cli/spec.md` § FR-C

## Goal

Wire the CLI scaffold (FR-B) to a real Playwright runner that loads the existing `e2e/` specs through a smoke-specific config, filters by `@smoke*` tags (FR-A), and runs against the customer-supplied endpoint with single-account auth. This is the MVP-complete deliverable that produces an HTML report.

## Acceptance criteria

- [ ] `playwright.smoke.config.ts` imports the existing `e2e/playwright.config.ts` and overrides:
- `testDir` to point at the existing `e2e/tests`
- `grep` to apply `--include` / `--exclude` tag filters
- `reporter` to `[['html', { outputFolder: /index, open: 'never' }], ['list']]`
- `use.baseURL` from `--endpoint`
- `use.ignoreHTTPSErrors` from `--insecure-tls`
- `use.video: 'retain-on-failure'`, `use.trace: 'retain-on-failure'`
- [ ] `runner.ts` programmatically invokes Playwright with the smoke config, injecting credentials via process env (never written to disk).
- [ ] Single-account authentication: the runner logs in once with the supplied email/password and reuses storage state across specs.
- [ ] Specs requiring multiple accounts (cross-user RBAC) are excluded from the `@smoke` selection by tag convention.
- [ ] Running `pnpm --filter backend.ai-webui-smoke-cli run smoke -- run --endpoint --email --password --output ./report` against a staging Backend.AI cluster:
- Logs in successfully with the supplied credentials
- Loads the dashboard
- Completes at minimum **one session lifecycle** (create batch session → polled to `RUNNING` → terminate cleanly)
- Writes a Playwright HTML report at `./report/index/index.html`
- Exits with code `0` on all-pass, non-zero on any failure
- [ ] No single binary or air-gap bundling is required — those are FR-G and FR-H.

## In scope

- `packages/backend.ai-webui-smoke-cli/src/runner.ts`
- `packages/backend.ai-webui-smoke-cli/playwright.smoke.config.ts`
- `packages/backend.ai-webui-smoke-cli/src/commands/run.ts`
- `packages/backend.ai-webui-smoke-cli/src/auth/storage-state.ts`

## Out of scope

- Air-gap concerns (Chromium bundling, outbound-traffic blocking) — FR-G
- Binary packaging — FR-H
- Doctor / preflight / role auto-detection — FR-D
- `summary.json` / `environment.json` / diagnostic block — FR-E
- Single-account-safe util extraction — FR-F (this task assumes the already-tagged smoke specs do not require multi-account helpers; if any tagged spec breaks for that reason, exclude it and note for FR-F)

## Test plan

- Smoke run against staging endpoint with a single user-role account produces a report directory with login + dashboard + one session lifecycle PASS.
- Forced credential failure exits non-zero and the HTML report shows the failure.

JIRA Issue: FR-2877

[FR-2871]: https://lablup.atlassian.net/browse/FR-2871?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[FR-2872]: https://lablup.atlassian.net/browse/FR-2872?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.