协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
testing-end-to-end【开发与工程】Facilitates end-to-end testing of complete workflows, verifying entire systems operate as intended from a user's perspective.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: testing-end-to-end description: Facilitates end-to-end testing of complete workflows, verifying entire systems operate as intended from a user's perspective. license: MIT compatibility: opencode metadata: version: "1.0.0" domain: coding triggers: end-to-end testing, e2e tests, user journey, complete workflow role: implementation scope: implementation output-format: code related-skills: testing-unit, testing-integration, testing-contract archetypes: tactical, diagnostic anti_triggers: unit testing, contract testing, performance testing response_profile: verbosity: medium directive_strength: high abstraction_level: tactical
Implements end-to-end (E2E) testing strategies to verify that all components of a system work together from the user's perspective. Focus on complete workflows and user journeys.
Cypress, Selenium).
# For Cypress
npm install cypress --save-dev
describe('User Journey', () => {
it('should complete a purchase', () => {
cy.visit('/');
cy.get('input[name=username]').type('User');
cy.get('input[name=password]').type('Password');
cy.get('button[type=submit]').click();
cy.url().should('include', '/dashboard');
});
});
npx cypress open
describe('End-to-End Testing Example', () => {
it('should allow a user to sign up and log in', () => {
cy.visit('/signup');
cy.get('input[name=email]').type('test@example.com');
cy.get('input[name=password]').type('password');
cy.get('form').submit();
cy.url().should('include', '/welcome');
});
});
data-testid selectors — Prefer [data-testid="submit-button"] over fragile CSS class or XPath selectors that break on style changes.Playwright provides cross-browser automation with auto-waiting and trace viewing:
from playwright.sync_api import Page, expect
def test_user_login_flow(page: Page):
"""Verify a user can log in and see the dashboard."""
page.goto("https://example.com/login")
page.get_by_label("Email").fill("test@example.com")
page.get_by_label("Password").fill("s3cret!")
page.get_by_role("button", name="Sign In").click()
expect(page).to_have_url("https://example.com/dashboard")
expect(page.get_by_text("Welcome, test@example.com")).to_be_visible()
def test_checkout_flow(page: Page):
"""Verify a user can add items to cart and complete checkout."""
page.goto("https://example.com/products")
page.get_by_test_id("add-to-cart-1").click()
page.get_by_test_id("add-to-cart-2").click()
page.get_by_test_id("checkout").click()
page.get_by_label("Address").fill("123 Main St")
page.get_by_role("button", name="Place Order").click()
expect(page.get_by_text("Order confirmed!")).to_be_visible()
Authoritative documentation links for this skill's domain. The model follows markdown links at load time to resolve external references and inline content.