cypress-test-generator

ehtbanton 的头像作者 ehtbanton

为Web应用程序测试生成Cypress E2E测试文件和配置。触发条件:"创建cypress测试"、"生成cypress配置"、"e2e测试用于"、"cypress设置"。

📖 中文导读:为Web应用程序测试生成Cypress E2E测试文件和配置。触发条件:"创建cypress测试"、"生成cypress配置"、"e2e测试用于"、"cypress设置"。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: cypress-test-generator description: Generate Cypress E2E test files and configuration for web application testing. Triggers on "create cypress test", "generate cypress config", "e2e test for", "cypress setup".

Cypress Test Generator

Generate Cypress E2E test files and configuration for comprehensive web application testing.

Output Requirements

File Output: cypress.config.ts, cypress/e2e/*.cy.ts Format: Valid Cypress configuration and test files Standards: Cypress 13.x

When Invoked

Immediately generate Cypress configuration and sample test files for the specified application.

Configuration Template

import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: {
    baseUrl: 'http://localhost:3000',
    supportFile: 'cypress/support/e2e.ts',
  },
});

Example Invocations

Prompt: "Create cypress config and login test" Output: Complete cypress.config.ts and cypress/e2e/login.cy.ts.