docs(cypress): add skill for Cypress tests - #13927
Open
GDamyanov wants to merge 5 commits into
Open
Conversation
|
🚀 Deployed on https://pr-13927--ui5-webcomponents-preview.netlify.app |
GDamyanov
marked this pull request as ready for review
August 18, 2026 11:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.