Skip to content

docs(cypress): add skill for Cypress tests - #13927

Open
GDamyanov wants to merge 5 commits into
mainfrom
cypress-test-skill
Open

docs(cypress): add skill for Cypress tests#13927
GDamyanov wants to merge 5 commits into
mainfrom
cypress-test-skill

Conversation

@GDamyanov

@GDamyanov GDamyanov commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What we add

A new skills/cypress/ folder that encodes how Cypress component tests are actually written in this project. It is a plain set of reference files — a skill — so an AI assistant (Claude
Code, Cursor, Copilot) gets the same guidance on every task.

The entry point is SKILL.md, which AGENTS.md points to. It carries the non-negotiable rules and a routing table that maps a task ("writing a new spec", "adding custom commands",
"reviewing a spec", "debugging a flaky test") to the one reference file that covers it.

The references sit under skills/cypress/references/ and split by concern: custom commands (COMMANDS.md), spec review (REVIEWING.md), and flaky test debugging (FLAKY-TESTS.md).

The skill is registered for all three major AI tools:

  • Claude Code — .claude/skills/cypress
  • Cursor — .cursor/rules/cypress-skill.mdc
  • GitHub Copilot — .github/instructions/cypress-tests.instructions.md

What it helps with

It captures the patterns that no linter enforces and that cost real time to rediscover. realClick instead of .click(). realType and realPress as standalone statements, not chained.
[ui5-button] attribute selectors instead of tag names. ui5TestConfiguration() for async setup. cy.waitRenderFinished() instead of cy.wait().

These are the traps that send someone (or the AI assistant) digging through existing specs to figure out the project's style. They are now written down once.

It also settles the questions that come up on every new spec. Which mount helper to use. How to alias elements. How to spy on UI5 custom events. How to simulate mobile viewports. What
makes a test flaky and how to fix it.

How it saves tokens and time

An assistant without this context re-derives the project's conventions on every task. It reads a few existing specs, finds two different interaction styles, and guesses. That
exploration burns tokens and often lands on a pattern that passes review but isn't idiomatic.

With the skill, that work collapses into reading one short reference. The load-on-demand design means a typical task pulls SKILL.md plus one reference file — a few thousand tokens —
rather than scanning the full test corpus.

The net effect is fewer tokens spent, fewer wrong guesses, and tests that match the patterns the team already follows.

  • inconsistent tests, wrong event methods, selector antipatterns, arbitrary waits
  • idiomatic specs that pass review without a style round-trip

@GDamyanov
GDamyanov deployed to netlify-preview August 14, 2026 08:19 — with GitHub Actions Active
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

@GDamyanov
GDamyanov deployed to netlify-preview August 14, 2026 10:35 — with GitHub Actions Active
@GDamyanov
GDamyanov marked this pull request as ready for review August 18, 2026 11:51
@GDamyanov
GDamyanov deployed to netlify-preview August 18, 2026 11:51 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant