Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

e2e-test

/e2e-test

Uruchamia, naprawia i rozwija testy end-to-end w Playwright dla kluczowych ścieżek, gdy zmiana dotyka przepływu lub CI zawodzi.

Repozytorium
hodi ↗
Licencja
AGPL-3.0
Ostatnia zmiana repozytorium
03.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 03.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

Co robi i kiedy

Uruchamia, naprawia i rozwija testy end-to-end w Playwright dla kluczowych ścieżek, gdy zmiana dotyka przepływu lub CI zawodzi.

Oryginalny opis (EN)

Run, fix or extend Hodi's end-to-end tests (Playwright, e2e/). Use when a change touches a key journey, when the e2e CI job fails, or to add a journey.

Jak działa

  1. 1. Run them
  2. 2. What the install holds
  3. 3. The journeys and who does them
  4. 4. Writing a test
  5. 5. After
Sekcje z nagłówków SKILL.md, w oryginale · 52 linii, 680 słów
Podgląd SKILL.md
---
name: e2e-test
description: Run, fix or extend Hodi's end-to-end tests (Playwright, e2e/). Use when a change touches a key journey, when the e2e CI job fails, or to add a journey.
---

# End-to-end tests

`e2e/hodi.spec.ts` goes through Hodi's key journeys in Chromium, on a fresh install, one after the other. The tests share one install and depend on each other's state: they run in order (`mode: 'serial'`, one worker), so a test may use what an earlier one created.

## 1. Run them

```bash
npm run test:e2e                      # builds the web app, starts e2e/server.ts, runs Chromium
npx playwright test -g "shares"       # one test (it still needs the tests before it: run all when in doubt)
```

- First time on a machine: `npx playwright install chromium`. With a Chromium already installed elsewhere, set `PLAYWRIGHT_CHROMIUM_PATH` to its binary instead.
- On a failure, `test-results/<test>/error-context.md` has the page's accessibility tree at the failing step, and `trace.zip` the whole run (`npx playwright show-trace …`). In CI, the `e2e` job uploads both as an artifact.
- Run the suite three times before pushing a new or changed test: a test that fails once in three is broken.

## 2. What the install holds

`e2e/server.ts` starts Hodi with `startHodi(config, outside)` (`server/start.ts`): the real server and the built web app, but every request to the outside world answered by the test itself.

- **Sources** come from `e2e/sources.yml`: Alpha Info (a base source, also a teen's) and Beta Presse (adults only).
- **Made-up sites** (`*.example`) are pages in `e2e/server.ts`: a home page naming its feed at `/`, the feed at `/feed` (dated from now), and article pages. Gamma is added by a profile, Delta and Epsilon are asked for by a teen. "Le grand dossier de l’hiver" is long enough to be left half read.
- `isPublicLink` lets a pasted `*.example` link through in place of the real public-address guard. Only the test harness does this; never relax the guard in `server/`.
- Pictures, video lengths and push notifications are stubbed. Never give the tests an AI key: setup picks "Sans IA".

To add a site or an article, add it to `articles` in `e2e/server.ts`. A new article shows up in every profile that follows its source, so check the counts and "not visible" assertions of later tests.

## 3. The journeys and who does them

| Profile                     | Page in the spec | Journeys                                                                                                                                          |
| --------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Alex, admin (made by setup) | `page`           | setup, reader, Enregistrés, search, new profiles, add a source, other device, phone, sends shares, answers a teen's requests, sets a teen's hours |
| Sam, adult                  | `sam`            | receives shares and reacts, private profile with a code, sign-out, Masquer and Historique, Suivis, Reprendre, English                             |
| Zoé, teen                   | `teen`           | only its sources, asks for sources, closed outside its hours                                                                                      |

The teen's hours test closes the app for Zoé: keep it last.

## 4. Writing a test

- Select by role and accessible name, in French, as a user sees the page: `getByRole('button', { name: 'Enregistrer', exact: true })`. Scope to a region (`getByRole('region', { name: 'Recherche' })`) when the same title appears twice (the reader's related articles, the list beside it).
- A text split by markup (a search hit's `<mark>`) does not match `getByText`: use the link's role and name.
- An article opened is often read at once (a short text fits the screen): it leaves the fil and Partages. Open it again through `openFromSearch`, where it stays.
- A new profile's first visit starts the guided tour, which covers the page: call `skipTour` right after `signIn`.
- Work the server does in the background (a new source's first fetch) shows through `afterReload`. Never wait with a fixed `waitForTimeout`.
- The reader keeps a reading position when it closes inside the app: go back with a link, not `goto`, which reloads the page first.
- No real site, no real key, no wait on the clock: anything that depends on the time of day computes its values from now (see the teen's hours test).
- Comments say why, in English, like the rest of the code.

## 5. After

`npm run typecheck` checks `e2e/` too (`tsconfig.e2e.json`). Then follow `prepare-pr`.

Wersje

RepozytoriumWynikLicencja
Ta strona · leclaudeur/hodi100AGPL-3.0
divinevideo/divine-mobile100AGPL-3.0
divinevideo/divine-mobile100AGPL-3.0
yassimba/loom100Apache-2.0
dataelement/bisheng100Apache-2.0
duc01226/EasyPlatform100MIT
duc01226/EasyPlatform100MIT
dataelement/bisheng100Apache-2.0
mrlemoos/galicia86MIT

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

Pobrania w ostatnich 30 dniach: 0 · ranking

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

Podobne skille

  • 100e2e-testing
    Planuje, generuje, uruchamia i naprawia testy end-to-end Playwright w pętli opartej na specyfikacji z Playwright Test Agents i @playwright/mcp.
  • 100playwright-test-writer
    Pisze i rozszerza testy Playwright E2E dla strony lub funkcji, także przy poprawkach istniejących testów przeglądarkowych.
  • 100v1-e2e-testing
    Pisze i naprawia testy end-to-end w przeglądarce, zwłaszcza w Playwright, i diagnozuje niestabilne testy.
  • 100e2e-playwright-testing
    Pisze testy end-to-end w Playwright dla aplikacji webowych, w tym automatyzację przeglądarki i przebiegi formularzy oraz ścieżek użytkownika.
  • 100e2e-testing
    Pisze, utrzymuje i naprawia testy end-to-end kluczowych ścieżek, wybiera ryzykowne przepływy i wyłapuje testy niestabilne w CI.
  • 90e2e
    Pisze i uruchamia testy end-to-end w Playwright dla ścieżki użytkownika: lokalizatory, dane testowe, sprawdzenia dostępności i ślady błędów.

Uwagi i zgłoszenia

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