Skip to content
Prompt

playwright-e2e-template — Cursor Rules

by karamata

AI Summary

Heuristic scoring (no AI key configured).

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "playwright-e2e-template — Cursor Rules" prompt rules to my project.
Repository: https://github.com/karamata/playwright-e2e-template

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Cursor Rules for playwright-e2e-template

Project Overview

This is a Playwright E2E testing framework with Cucumber BDD integration, written in TypeScript. The framework provides a robust, maintainable, and scalable solution for end-to-end browser automation testing with comprehensive Allure reporting capabilities.

Tech Stack

• Browser Automation: Playwright v1.45.0 (Chromium, Firefox, WebKit support) • BDD Framework: Cucumber v10.3.1 (Gherkin syntax) • Language: TypeScript v5.3.3 (strict mode enabled) • Test Runner: cucumber-js • Reporting: Allure Reports v2.34.1 + Cucumber HTML/JSON/XML reports • Node Runtime: ts-node v10.9.2

Page Object Model (POM) Pattern ⭐ PRIMARY PATTERN

• BasePage (src/pages/base.page.ts): Abstract base class with common page operations • Page Classes (src/pages/*.page.ts): Concrete page classes extending BasePage • Elements declared as protected properties • Locators initialized in constructor • Public methods for business actions • Encapsulate all page-specific logic • Step Definitions (src/step-definitions/*.steps.ts): • ONLY call methods from page objects • NO direct interaction with browser or elements • NO dependency on PageHelper for page interactions • Focus on orchestrating test flow

Singleton Pattern

• BrowserManager (src/config/browser.config.ts) uses the Singleton pattern to ensure one browser instance per test scenario • Access browser via browserManager.getPage() ONLY when initializing page objects

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 5mo ago
Stale
AdoptionUnder 100 stars
0 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Issues0
Updated5mo ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more