positron-e2e-tests

7
0
Source

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.

Install

mkdir -p .claude/skills/positron-e2e-tests && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2307" && unzip -o skill.zip -d .claude/skills/positron-e2e-tests && rm skill.zip

Installs to .claude/skills/positron-e2e-tests

About this skill

Positron Playwright E2E Testing

Purpose

Provides specialized knowledge and patterns for writing correct, reliable Playwright e2e tests that follow Positron's established conventions and avoid common mistakes.

When to Use This Skill

Load this skill when:

  • Creating new e2e test files
  • Adding test cases to existing test files
  • Debugging flaky or failing tests
  • Understanding the test fixture system
  • Working with page objects
  • Choosing correct selectors and assertions

Critical: Test File Structure

Every test file MUST follow this structure:

import { test, expect, tags } from '../_test.setup';

// REQUIRED: Each test file needs a unique suiteId
test.use({
	suiteId: __filename
});

test.describe('Feature Name', {
	tag: [tags.WEB, tags.WIN, tags.CRITICAL, tags.FEATURE_TAG]
}, () => {

	test.beforeEach(async function ({ app }) {
		// Optional setup for each test
	});

	test.afterEach(async function ({ app, hotKeys }) {
		// Cleanup after each test
		await hotKeys.closeAllEditors();
	});

	test('Test description', async function ({ app, python }) {
		// Test implementation
	});
});

MANDATORY REQUIREMENTS:

  1. Import from ../_test.setup - NOT from @playwright/test
  2. Set suiteId: __filename - Required for app isolation
  3. Use function syntax for tests (not arrow functions) - Required for fixtures
  4. Add appropriate tags for platform filtering

Quick Reference: Available Fixtures

FixtureUse Case
appAccess workbench page objects: app.workbench.console, etc.
pageDirect Playwright page access: page.getByLabel(...)
pythonAuto-start Python interpreter before test
rAuto-start R interpreter before test
sessionsManual session management: await sessions.start('python')
executeCodeExecute code: await executeCode('Python', 'print("hi")');
openFileOpen file: await openFile('workspaces/test/file.py');
hotKeysKeyboard shortcuts: await hotKeys.closeAllEditors();
settingsChange settings: await settings.set({ 'key': value });

See references/fixtures.md for complete fixture documentation.

Quick Reference: Page Objects

Access via app.workbench.*:

const { console, variables, dataExplorer, plots, notebooks, sessions } = app.workbench;

// Execute code
await console.executeCode('Python', 'x = 1');

// Wait for content
await console.waitForConsoleContents('expected text');

// Variable interaction
await variables.doubleClickVariableRow('df');

// Data explorer
await dataExplorer.grid.verifyTableData([{ col: 'value' }]);

See references/page-objects.md for complete page object documentation.

Quick Reference: Assertions

// Visibility with timeout
await expect(locator).toBeVisible({ timeout: 30000 });

// Text content
await expect(locator).toHaveText('expected');
await expect(locator).toContainText('partial');

// Count
await expect(locator).toHaveCount(3, { timeout: 15000 });

// Retry pattern for flaky operations
await expect(async () => {
	await someAction();
	await expect(resultLocator).toBeVisible();
}).toPass({ timeout: 15000 });

See references/assertions.md for complete assertion patterns.

Quick Reference: Test Tags

Feature tags (what the test covers):

  • tags.CONSOLE, tags.DATA_EXPLORER, tags.NOTEBOOKS, tags.PLOTS, tags.VARIABLES
  • tags.CRITICAL - High priority tests

Platform tags (where the test runs):

  • tags.WEB - Enable web browser testing
  • tags.WIN - Enable Windows testing
  • Default: Linux/Electron only
test.describe('Console Tests', {
	tag: [tags.WEB, tags.WIN, tags.CRITICAL, tags.CONSOLE]
}, () => { ... });

Common Mistakes to Avoid

Critical (will break tests):

  1. Wrong imports - use ../_test.setup, not @playwright/test
  2. Missing suiteId - must have test.use({ suiteId: __filename })
  3. Arrow functions - use function syntax, not async ({ app }) =>
  4. Missing platform tags - add tags.WEB, tags.WIN for cross-platform

Quality issues: 5. No timeout on assertions - use { timeout: 30000 } for async operations 6. No test.step() - wrap complex multi-action sequences for better reports

See references/common-mistakes.md for 26 detailed gotchas with code examples.

Running Tests

# Run specific test file
npx playwright test <test-name>.test.ts --project e2e-electron

# Run all tests in a category
npx playwright test test/e2e/tests/<category>/

# Run with specific tags
npx playwright test --grep @:critical

# Run in headed mode (see browser)
npx playwright test --headed

# Run with debug mode
npx playwright test --debug

# Show test report
npx playwright show-report

Progressive Documentation

For detailed information, read the bundled reference docs:

  • references/test-structure.md - Complete test file structure and organization
  • references/fixtures.md - All available fixtures and their usage
  • references/page-objects.md - Page object patterns and available POMs
  • references/assertions.md - Assertion patterns and waiting strategies
  • references/common-mistakes.md - Comprehensive list of gotchas to avoid

Key Architecture Principles

  1. Worker-scoped app - One app instance per test file (suite)
  2. Test-scoped fixtures - page, sessions, etc. fresh per test
  3. Page Object Model - UI interactions wrapped in POMs via app.workbench.*
  4. Tag-based filtering - Tests tagged for platform and feature filtering
  5. Automatic cleanup - Tracing, screenshots attached on failure

Getting Help

  1. Look at existing tests in test/e2e/tests/<feature>/ for patterns
  2. Check page object source in test/e2e/pages/ for available methods
  3. Read test/e2e/tests/_test.setup.ts for fixture definitions
  4. Use --debug flag to step through tests interactively

positron-qa-verify

posit-dev

Generates clear, actionable verification guides for QA testing of Positron bug fixes and features

00

positron-issue-creator

posit-dev

This skill should be used when drafting GitHub issues for the Positron repository. It provides workflows for searching duplicates, selecting appropriate labels, gathering complete context through questioning, and writing terse, fluff-free issues that precisely describe what is needed or wrong. The skill prepares issues for manual submission by the user. Use this skill when the user asks to draft or prepare an issue for Positron.

10

positron-notebooks

posit-dev

This skill should be used when developing, debugging, or maintaining Positron Notebooks - the React-based feature-flagged notebook editor. Load this skill when tasks involve notebook cells, execution, selection state, context keys, or notebook editor features.

00

positron-intake-rotation

posit-dev

This skill should be used when handling issue intake rotation duties for the Positron repository. It provides workflows for reviewing and organizing new issues, responding to discussions, handling support tickets, and searching for related content. Use this skill when on intake rotation duty, when helping someone with intake tasks, or when learning the intake rotation process.

80

port-from-bslib

posit-dev

Comprehensive guide for porting UI components from R's bslib package to py-shiny. Use this skill when: (1) User asks to "port this feature" or "port a component" and mentions bslib or links to a bslib PR (e.g., github.com/rstudio/bslib/pull/...), (2) Porting a new component from bslib to py-shiny, (3) Adding a new input, output, or UI component that exists in bslib, (4) Implementing feature parity with bslib, (5) Working on bslib-related features or components. Covers the complete workflow including understanding source implementation, creating Python equivalents, vendoring assets (SCSS, CSS, JavaScript), creating tests, documentation, and all necessary project files.

20

positron-pr-helper

posit-dev

Generates well-structured PR bodies with dynamically fetched e2e test tags

30

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.