rstudio-create-playwright-tests

Create stable Playwright tests for RStudio Desktop and Server UIs.

5.0k|1.2k|Updated Dec 7, 2010
One-click install
npx skills add https://github.com/rstudio/rstudio --skill rstudio-create-playwright-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rstudio-create-playwright-tests
Source: https://github.com/rstudio/rstudio/tree/main/.claude/skills/rstudio-create-playwright-tests
Command: npx skills add https://github.com/rstudio/rstudio --skill rstudio-create-playwright-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured guide for creating, reviewing, and migrating RStudio Playwright tests in TypeScript, consolidating rules, patterns, and review checklists into a single reference.

Core Features & Use Cases

  • Non-negotiable rules for stable, cross-environment Playwright tests against RStudio Desktop and Server
  • Stable selector strategies derived from RStudio source patterns to avoid flaky IDs
  • Ace editor interaction patterns (pressSequentially, forced clicks) and NES/Copilot guidance
  • Project structure and review workflows, plus practical checklists for code review and migration

Quick Start

Start by scaffolding a new Playwright test suite for RStudio and apply the standard patterns described in this guide.

Frequently Asked Questions about rstudio-create-playwright-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write stable Playwright tests for the RStudio UI?

To write stable Playwright tests for the RStudio UI, use stable selectors derived from source code, avoid dynamic IDs, and interact with the Ace editor using pressSequentially to ensure cross-environment compatibility.

Why do my Playwright UI tests fail when interacting with the Ace editor in RStudio?

Playwright UI tests fail with the Ace editor in RStudio when using standard typing methods. You must use pressSequentially for text input and forced clicks to handle the editor's custom event handling correctly.

What is the best way to execute commands in Playwright tests across RStudio Desktop and Server?

The best way to execute commands in Playwright tests across RStudio Desktop and Server is using the .rs.api.executeCommand() method, which ensures cross-mode compatibility and prevents environment-specific test failures.

Can I use Playwright to migrate existing UI tests for both RStudio Desktop and Server environments?

Yes, you can use Playwright to migrate existing UI tests for RStudio Desktop and Server environments by applying structured review checklists and standard patterns to ensure cross-platform stability.

What selector strategies should I avoid to prevent flaky Playwright tests in RStudio?

To prevent flaky Playwright tests in RStudio, you should avoid using dynamic IDs. Instead, derive stable selectors from RStudio source code patterns to reliably locate UI elements across test runs.

Do I need TypeScript to structure my RStudio Playwright test suite?

Using TypeScript to structure your RStudio Playwright test suite is recommended to enforce type safety and maintainable test structures, consolidating rules and review workflows into a single reference.