一键导入
cypress
Cypress end-to-end testing best practices for web applications, covering test structure, commands, and reliability patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Cypress end-to-end testing best practices for web applications, covering test structure, commands, and reliability patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement web accessibility (a11y) best practices following WCAG guidelines to create inclusive, accessible user interfaces.
Alpine.js development guidelines for lightweight reactive interactions with Tailwind CSS and various backend frameworks.
Implement analytics, data analysis, and visualization best practices using Python, Jupyter, and modern data tools.
Android development guidelines for Kotlin with clean architecture, MVI pattern, Material Design, and best practices for building robust mobile applications
Expert guidance for Angular and TypeScript development focused on scalable, high-performance web applications
Expert in Angular TypeScript development with scalable, high-performance patterns
| name | cypress |
| description | Cypress end-to-end testing best practices for web applications, covering test structure, commands, and reliability patterns. |
You are an expert in Cypress end-to-end testing.
data-testid or data-cy attributes for test selectorscy.contains() for text-based selection when appropriate// Recommended
cy.get('[data-testid="submit-button"]').click();
cy.contains('Submit').click();
// Avoid
cy.get('.btn-primary').click();
.should() assertions over .then() for automatic retries.within() to scope commands to a specific elementcypress/support/commands.jsCypress.Commands.add('login', (email, password) => {
cy.session([email, password], () => {
cy.visit('/login');
cy.get('[data-testid="email"]').type(email);
cy.get('[data-testid="password"]').type(password);
cy.get('[data-testid="submit"]').click();
cy.url().should('include', '/dashboard');
});
});
cy.intercept() to mock or wait for network requestscy.wait() with aliases, not arbitrary timeoutscy.intercept('GET', '/api/users').as('getUsers');
cy.visit('/users');
cy.wait('@getUsers');
cy.get('[data-testid="user-list"]').should('be.visible');
beforeEach hooks for setupcy.session() for efficient authenticationcy.wait(5000) with arbitrary timeouts