Toolverse
All skills

positron-e2e-tests

by posit-dev

This skill should be used when writing, debugging, or maintaining Playwright e2e tests for Positron. Load this skill when creating new test files, adding test cases, fixing flaky tests, or understanding the test infrastructure.

Installation

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

Installation

Quick info

Author
posit-dev
Category
Testing
Views
9

About this skill

This skill should be used when writing, debugging, or maintaining Playwright e2e tests for Positron. Load this skill when creating new test files, adding test cases, fixing flaky tests, or understanding the test infrastructure.

How to use

  1. Załaduj skill positron-e2e-tests w Claude'ie, gdy planujesz pracę nad testami Playwright dla Positrona — niezależnie od tego, czy tworzysz nowy plik testowy, dodajesz przypadki testowe, czy debugujesz istniejące testy.

  2. Upewnij się, że każdy plik testowy importuje z '../_test.setup', a nie bezpośrednio z '@playwright/test'. Na początku pliku ustaw 'suiteId: __filename' w test.use(), co jest wymagane do izolacji aplikacji.

  3. Strukturyzuj testy, używając 'test.describe()' do grupowania i dodaj odpowiednie tagi platformy (tags.WEB, tags.WIN, tags.CRITICAL, tags.FEATURE_TAG) — skill pomoże Ci wybrać właściwe tagi dla Twojego przypadku.

  4. Pisz funkcje testowe, używając składni 'function' zamiast arrow functions, ponieważ jest to wymagane do prawidłowego działania fixture'ów. Skill będzie Ci podpowiadać dostępne fixture'y takie jak 'app' (dostęp do stron workbench), 'page' (bezpośredni dostęp Playwright), 'python' (auto-start interpretera) i 'r' (auto-start R).

  5. Gdy debugujesz niestabilne lub nieudane testy, skonsultuj się ze skillem w sprawie wyboru poprawnych selektorów, asercji i fixture'ów — skill zawiera wytyczne dotyczące unikania typowych błędów.

  6. Wykorzystaj fixture 'hotKeys.closeAllEditors()' w 'test.afterEach()' do czyszczenia po każdym teście, co zapewnia izolację między testami.

Related skills