Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

e2e-repro

/e2e-repro

Zamienia zgłoszenie błędu w jeden test Playwright, który nie przechodzi przed poprawką, a po niej przechodzi.

Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Zamienia zgłoszenie błędu w jeden test Playwright, który nie przechodzi przed poprawką, a po niej przechodzi.

Oryginalny opis (EN)

Turn a bug report into one Playwright E2E test that is red on the bug and green once it is fixed, before anyone touches the code. Use when asked to reproduce a bug, write a regression test for a bug report, or confirm a reported bug is real. Reproduces live in a browser with playwright-cli first.

Jak działa

  1. 1. Expected and actual
  2. 2. Reproduce live
  3. 3. Write the test
  4. 4. Run until red for the right reason
Sekcje z nagłówków SKILL.md, w oryginale · 55 linii, 635 słów
Podgląd SKILL.md
---
name: e2e-repro
description: Turn a bug report into one Playwright E2E test that is red on the bug and green once it is fixed, before anyone touches the code. Use when asked to reproduce a bug, write a regression test for a bug report, or confirm a reported bug is real. Reproduces live in a browser with playwright-cli first.
license: MIT
---

# e2e-repro

Input: a bug report (any text) and the environment file `.e2e/e2e-env.md` (base URL, accounts, login steps, reset), called ENV below. ENV names a variable for each password; the values are in `.env.e2e`, which is not committed. No `.e2e/e2e-env.md` in the repo: run the `e2e-setup` skill first. Output: one spec file with one test asserting what the reporter expected, red right now. Or, when the bug does not show up live, a "could not reproduce" report and no spec. The test never asserts the broken behaviour: green on the bug would be a test of the bug.

The product code stays unread and untouched. The test is the diagnosis; the fix is someone else's.

## 1. Expected and actual

Read the report. Write two lines, both user-visible, both checkable with a Playwright assertion:

- **expected**: what the reporter should have seen ("the cart page still lists Trail Running Socks after signing in").
- **actual**: what they saw ("the cart page is empty").

Vague report with no way to pick the page or the record: ask one precise question and stop.

## 2. Reproduce live

`playwright-cli` is installed (a prerequisite that `e2e-setup` checks) and the app is already up at the base URL. The first command is `open`; a connection error on `open` is reported as the app being down. The base URL, the login steps and the account come from ENV, never from memory or a guess.

Each line is one `playwright-cli` command:

```
open <base url><login path>
snapshot              # refs like e12
fill e12 "<account email from ENV>"
click e15
snapshot              # does this show the actual line? that is the bug
generate-locator e20
```

Follow the reporter's steps on the seeded records from ENV (the seeded key, the listed products), logging in through the UI. Loop: act, snapshot, write down the user-facing locator (`getByRole`, `getByLabel`, `getByText`; `getByTestId` only when nothing user-facing is unique). After the last step, `reload` and snapshot again: the state after reload is the server's truth and the stronger assertion.

Bug seen in the snapshot: step 3. Bug not seen: try the nearest variant once (another seeded record, a reload, the direct request with `run-code`), then stop. Report "could not reproduce", list the exact steps and what each snapshot showed, write no spec. A guess at a test that passes is worth less than that list.

Done when: a snapshot shows the actual line, and every step to it has a proven locator.

## 3. Write the test

One file, one `test`, named after the expected line. Header comment: the report title, the expected line, the actual line. Load the `e2e-spec-rules` skill and follow every rule in it. On top of those rules:

- The test is the reporter's steps, then the assertion of the expected line.
- Exact values matter most here: `toHaveText("$0.00")`, `toHaveURL("/checkout")`, `toHaveCount(1)`, since `toContainText` and `toBeVisible` on generic text let the bug slip past. Assert after the reload from step 2 when the report is about state that should persist.
- Assertions: the expected line, plus stable preconditions (the seeded row count before the step).

## 4. Run until red for the right reason

Run `npx playwright test <file>`. If the Playwright config does not load `.env.e2e`, load it into the shell first (`set -a; . ./.env.e2e; set +a`). Three outcomes:

- Fails on the expected-line assertion, and the failure message shows the actual value from step 1: done. Report the file, the assertion, and the actual value.
- Fails anywhere else (locator matches 0 or 2+, wrong wait, login): the spec is wrong. Fix it from a fresh live snapshot, never with `.first()` or a try/catch.
- Green: the test did not capture the bug. Back to step 2; the assertion or the steps missed what the reporter did.

Close the browser: `playwright-cli close`.

Wersje

W bazie nie ma innych skilli o nazwie e2e-repro.

Migawka bazy z 13.11.2026 · wersja paczki bbac2914f416 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100repro
    Zamienia zgłoszenie błędu z GitHuba w najmniejszy test, który nie przechodzi, w stylu projektu, uruchamia go i raportuje wynik bez otwierania PR.
  • 96repro-first
    Naprawia zgłoszony błąd, najpierw odtwarzając go w teście, który nie przechodzi, a potem wprowadza minimalną poprawkę.
  • 81bug-to-test
    Zamienia opis błędu w ukierunkowany test regresji i pokazuje, że nie przechodzi z powodu, który zgłoszono.
  • 87bug-reproduction
    Zamienia ogólnikowe zgłoszenie błędu w zweryfikowaną minimalną reprodukcję i test regresji, który najpierw pada, z użyciem git bisect do znalezienia commita wprowadzającego błąd.
  • 100tdd
    Odtwarza błąd w zasobie TypeScript jako test regresyjny, który nie przechodzi przed poprawką i przechodzi po niej.
  • 95session-to-playwright
    Zamienia nagraną sesję użytkownika w test Playwright, który nie przejdzie, dopóki zgłoszony błąd nie zostanie naprawiony.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.