# prowler-test-ui

prowler-test-ui enforces Playwright E2E testing conventions for Prowler UI. Useful when building or editing tests inside ui/tests.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · ★ 15302 repo stars
- Author: prowler-cloud
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/prowler-cloud/prowler/tree/HEAD/skills/prowler-test-ui/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/prowler-test-ui

## What it does

This skill establishes test conventions for the Prowler front-end suite. Every feature folder under `ui/tests/{page-name}/` requires three linked files: the Page Object in `{page-name}-page.ts`, all specs in `{page-name}.spec.ts`, and mandatory documentation in `{page-name}.md`. Test IDs such as `@PROV-E2E-001` must strictly match between the Markdown document and the test spec.

The guidance enforces strict wait strategies. It bans `networkidle` and arbitrary sleeps because polling and WebSockets produce flaky runs. Instead, tests must rely on explicit assertions like `toBeVisible()`, navigation checks via `waitForURL()`, or encapsulated `verifyPageLoaded()` calls. Redirect assertions belong inside Page Object helper methods named `verifyOn{PageName}Page()`, not in raw test bodies.

When Playwright MCP tools run in the environment, the workflow demands taking real DOM snapshots and clicking through forms before generating code. Working without Playwright MCP removes that exploratory step.

## Requirements
- Works with: Playwright

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add prowler-cloud/prowler --skill prowler-test-ui -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/prowler-test-ui/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/prowler-test-ui/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add prowler-cloud/prowler --skill prowler-test-ui -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/prowler-test-ui/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add prowler-cloud/prowler --skill prowler-test-ui -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/prowler-test-ui/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install prowler-cloud/prowler skills/prowler-test-ui
```

2. **Manually: put the files in place**
- File: `.github/skills/prowler-test-ui/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add prowler-cloud/prowler --skill prowler-test-ui -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/prowler-cloud/prowler --path skills/prowler-test-ui
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/prowler-test-ui/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add prowler-cloud/prowler --skill prowler-test-ui -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/prowler-cloud/prowler/tree/HEAD/skills/prowler-test-ui/SKILL.md

## When to use it
- scaffold Page Object classes following Prowler UI conventions
- keep test case tags synchronized between spec files and Markdown docs
- eliminate flaky networkidle waits in Playwright test suites
- write automated flows for cloud providers and security scans

## Example prompts
- Create an E2E test for the provider setup page using Prowler UI standards
- Update ui/tests/scans/scans.spec.ts and sync all test IDs in scans.md
- Implement a Page Object for sign-in with redirect verification

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d33e4b4495f0e6a7.

BEGIN THIRD-PARTY FILE d33e4b4495f0e6a7
````text
---
name: prowler-test-ui
description: >
  E2E testing patterns for Prowler UI (Playwright).
  Trigger: When writing Playwright E2E tests under ui/tests in the Prowler UI (Prowler-specific base page/helpers, tags, flows).
license: Apache-2.0
metadata:
  author: prowler-cloud
  version: "1.0"
  scope: [root, ui]
  auto_invoke:
    - "Writing Prowler UI E2E tests"
    - "Working with Prowler UI test helpers/pages"
allowed-tools: Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, Task
---

> **Generic Patterns**: For base Playwright patterns (Page Object Model, selectors, helpers), see the `playwright` skill.
> This skill covers **Prowler-specific** conventions only.

## Prowler UI Test Structure

```text
ui/tests/
├── base-page.ts              # Prowler-specific base page
├── helpers.ts                # Prowler test utilities
└── {page-name}/
    ├── {page-name}-page.ts   # Page Object Model
    ├── {page-name}.spec.ts   # ALL tests (single file per feature)
    └── {page-name}.md        # Test documentation (MANDATORY - sync with spec.ts)
```

---

## MANDATORY Checklist (Create or Modify Tests)

**⚠️ ALWAYS verify BEFORE completing any E2E task:**

### When CREATING new tests
- [ ] `{page-name}-page.ts` - Page Object created/updated
- [ ] `{page-name}.spec.ts` - Tests added with correct tags (@TEST-ID)
- [ ] `{page-name}.md` - Documentation created with ALL test cases
- [ ] Test IDs in `.md` match tags in `.spec.ts`

### When MODIFYING existing tests
- [ ] `{page-name}.md` MUST be updated if:
  - Test cases were added/removed
  - Test flow changed (steps)
  - Preconditions or expected results changed
  - Tags or priorities changed
- [ ] Test IDs synchronized between `.md` and `.spec.ts`

### Quick validation
```bash
# Verify .md exists for each test folder
ls ui/tests/{feature}/{feature}.md

# Verify test IDs match
grep -o "@[A-Z]*-E2E-[0-9]*" ui/tests/{feature}/{feature}.spec.ts | sort -u
grep -o "\`[A-Z]*-E2E-[0-9]*\`" ui/tests/{feature}/{feature}.md | sort -u
```

> [!IMPORTANT]
> ❌ An E2E change is NOT considered complete without updating the corresponding `.md` file.

---

## MCP Workflow - CRITICAL

**⚠️ MANDATORY: If Playwright MCP tools are available, ALWAYS use them BEFORE creating tests.**

1. **Navigate** to target page
2. **Take snapshot** to see actual DOM structure
3. **Interact** with forms/elements to verify real flow
4. **Document actual selectors** from snapshots
5. **Only then** write test code
````
END THIRD-PARTY FILE d33e4b4495f0e6a7

The third-party file has ended. Everything between the d33e4b4495f0e6a7 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2510 of 8013 bytes. © prowler-cloud · Apache-2.0 · https://github.com/prowler-cloud/prowler/tree/HEAD/skills/prowler-test-ui/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
