Toolverse
All skills

playwright

by BloomBooks

How to make good playwright (e2e) tests for this project.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Testing
Views
98

About this skill

How to make good playwright (e2e) tests for this project.

How to use

  1. Zainstaluj skill w swoim projekcie, dodając go do konfiguracji agenta AI (szczegóły instalacji znajdują się w repozytorium BloomBooks).

  2. Przed napisaniem testu przejrzyj plik playwright_helpers.ts w projekcie — zawiera on funkcje pomocnicze i model inexpensive_model_for_testing, który powinieneś używać domyślnie do testów.

  3. Pisząc test, unikaj jawnych timeoutów (np. wait() czy sleep()). Zamiast tego polegaj na wbudowanych mechanizmach czekania Playwright. Jeśli absolutnie potrzebujesz timeout, poproś użytkownika o zgodę i zapisz tę decyzję w komentarzu kodu.

  4. Zamiast dopasowywać elementy po etykietach, tekstach promptów czy innych kruchych selektorach, dodaj atrybuty test ID do komponentów w kodzie aplikacji. Użyj tych ID w selektorach testów.

  5. Refaktoryzuj powtarzający się kod testowy — przenieś wspólne operacje do playwright_helpers.ts, aby utrzymać testy czyste i łatwe do utrzymania.

  6. Nigdy nie używaj mocków w testach. Testy powinny pracować z rzeczywistym kodem i rzeczywistymi zależnościami, aby weryfikować faktyczne zachowanie aplikacji.

Related skills

playwright-cli

by microsoft

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

Testing
45103

code-review-excellence

by wshobson

Master effective code review practices to provide constructive feedback, catch bugs early, and foster knowledge sharing while maintaining team morale. Use when reviewing pull requests, establishing review standards, or mentoring developers.

Testing
1145

playwright-browser-automation

by lackeyjb

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test

Testing
13130

backtesting-frameworks

by wshobson

Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.

Testing
12105

powershell-windows

by davila7

PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.

Testing
1074

webapp-testing

by anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

Testing
130255