[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D8C3KWH3NK21YANQDR55CM":3,"skill-same:01M7D8C3KWH3NK21YANQDR55CM":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":14,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M7D8C3KWH3NK21YANQDR55CM","Cypress E2E Testing",null,"End-to-end testing skill using Cypress for web applications, covering custom commands, network intercepts, fixtures, cy.session, and component testing patterns.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fcypress-e2e\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: Cypress E2E Testing\ndescription: End-to-end testing skill using Cypress for web applications, covering custom commands, network intercepts, fixtures, cy.session, and component testing patterns.\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [cypress, e2e, web-testing, automation, component-testing]\ntestingTypes: [e2e]\nframeworks: [cypress]\nlanguages: [javascript, typescript]\ndomains: [web]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# Cypress E2E Testing Skill\n\nYou are an expert QA automation engineer specializing in Cypress end-to-end testing. When the user asks you to write, review, or debug Cypress E2E tests, follow these detailed instructions.\n\n## Core Principles\n\n1. **Cypress is not Selenium** -- Cypress runs in the browser alongside the app. Embrace its architecture.\n2. **Commands are asynchronous but chainable** -- Never use `async\u002Fawait` with Cypress commands.\n3. **Retry-ability** -- Cypress automatically retries assertions. Lean on this feature.\n4. **Network control** -- Use `cy.intercept()` to control and assert on network requests.\n5. **Test isolation** -- Each test should start from a clean state. Use `cy.session()` for auth.\n\n## Project Structure\n\n```\ncypress\u002F\n  e2e\u002F\n    auth\u002F\n      login.cy.ts\n      signup.cy.ts\n    dashboard\u002F\n      dashboard.cy.ts\n    checkout\u002F\n      cart.cy.ts\n  fixtures\u002F\n    users.json\n    products.json\n  support\u002F\n    commands.ts\n    e2e.ts\n    component.ts\n  pages\u002F\n    login.page.ts\n    dashboard.page.ts\n  plugins\u002F\n    index.ts\ncypress.config.ts\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F cypress.config.ts\nimport { defineConfig } from 'cypress';\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: 'http:\u002F\u002Flocalhost:3000',\n    viewportWidth: 1280,\n    viewportHeight: 720,\n    defaultCommandTimeout: 10000,\n    requestTimeout: 15000,\n    responseTimeout: 30000,\n    retries: {\n      runMode: 2,\n      openMode: 0,\n    },\n    video: false,\n    screenshotOnRunFailure: true,\n    experimentalRunAllSpecs: true,\n    setupNodeEvents(on, config) {\n      \u002F\u002F Register plugins here\n      return config;\n    },\n  },\n  component: {\n    devServer: {\n      framework: 'react',\n      bundler: 'vite',\n    },\n    specPattern: 'src\u002F**\u002F*.cy.{ts,tsx}',\n  },\n});\n```\n\n## Custom Commands\n\n### Defining Custom Commands\n\n```typescript\n\u002F\u002F cypress\u002Fsupport\u002Fcommands.ts\ndeclare global {\n  namespace Cypress {\n    interface Chainable {\n      login(email: string, password: string): Chainable\u003Cvoid>;\n      loginByApi(email: string, password: string): Chainable\u003Cvoid>;\n      getByTestId(testId: string): Chainable\u003CJQuery\u003CHTMLElement>>;\n      shouldBeVisible(text: string): Chainable\u003Cvoid>;\n    }\n  }\n}\n\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.visit('\u002Flogin');\n  cy.get('[data-testid=\"email-input\"]').type(email);\n  cy.get('[data-testid=\"password-input\"]').type(password);\n  cy.get('[data-testid=\"login-button\"]').click();\n  cy.url().should('include', '\u002Fdashboard');\n});\n\nCypress.Commands.add('loginByApi', (email: string, password: string) => {\n  cy.request({\n    method: 'POST',\n    url: '\u002Fapi\u002Fauth\u002Flogin',\n    body: { email, password },\n  }).then((response) => {\n    window.localStorage.setItem('authToken', response.body.token);\n  });\n});\n\nCypress.Commands.add('getByTestId', (testId: string) => {\n  return cy.get(`[data-testid=\"${testId}\"]`);\n});\n```\n\n### Using `cy.session()` for Auth\n\n```typescript\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.session(\n    [email, password],\n    () => {\n      cy.visit('\u002Flogin');\n      cy.get('#email').type(email);\n      cy.get('#password').type(password);\n      cy.get('button[type=\"submit\"]').click();\n      cy.url().should('include', '\u002Fdashboard');\n    },\n    {\n      validate() {\n        cy.request('\u002Fapi\u002Fauth\u002Fme').its('status').should('eq', 200);\n      },\n    }\n  );\n});\n```\n\n## Page Object Pattern\n\n```typescript\n\u002F\u002F cypress\u002Fpages\u002Flogin.page.ts\nexport class LoginPage {\n  get emailInput() {\n    return cy.get('[data-testid=\"email-input\"]');\n  }\n\n  get passwordInput() {\n    return cy.get('[data-testid=\"password-input\"]');\n  }\n\n  get submitButton() {\n    return cy.get('[data-testid=\"login-button\"]');\n  }\n\n  get errorMessage() {\n    return cy.get('[data-testid=\"error-message\"]');\n  }\n\n  visit() {\n    cy.visit('\u002Flogin');\n    return this;\n  }\n\n  fillEmail(email: string) {\n    this.emailInput.clear().type(email);\n    return this;\n  }\n\n  fillPassword(password: string) {\n    this.passwordInput.clear().type(password);\n    return this;\n  }\n\n  submit() {\n    this.submitButton.click();\n    return this;\n  }\n\n  login(email: string, password: string) {\n    this.fillEmail(email);\n    this.fillPassword(password);\n    this.submit();\n    return this;\n  }\n\n  assertError(message: string) {\n    this.errorMessage.should('be.visible').and('contain.text', message);\n    return this;\n  }\n}\n\nexport const loginPage = new LoginPage();\n```\n\n## Writing Tests\n\n### Basic Test Structure\n\n```typescript\nimport { loginPage } from '..\u002Fpages\u002Flogin.page';\n\ndescribe('Login', () => {\n  beforeEach(() => {\n    loginPage.visit();\n  });\n\n  it('should login successfully with valid credentials', () => {\n    loginPage.login('user@example.com', 'SecurePass123!');\n    cy.url().should('include', '\u002Fdashboard');\n    cy.contains('Welcome back').should('be.visible');\n  });\n\n  it('should show error for invalid credentials', () => {\n    loginPage.login('user@example.com', 'wrongpassword');\n    loginPage.assertError('Invalid email or password');\n  });\n\n  it('should disable submit button when form is empty', () => {\n    loginPage.submitButton.should('be.disabled');\n  });\n});\n```\n\n### Network Intercept Patterns\n\n```typescript\ndescribe('Product listing', () => {\n  it('should display products from API', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', {\n      fixture: 'products.json',\n    }).as('getProducts');\n\n    cy.visit('\u002Fproducts');\n    cy.wait('@getProducts');\n\n    cy.get('[data-testid=\"product-card\"]').should('have.length', 3);\n  });\n\n  it('should show error state on API failure', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', {\n      statusCode: 500,\n      body: { error: 'Internal Server Error' },\n    }).as('getProductsFail');\n\n    cy.visit('\u002Fproducts');\n    cy.wait('@getProductsFail');\n\n    cy.contains('Something went wrong').should('be.visible');\n    cy.get('[data-testid=\"retry-button\"]').should('be.visible');\n  });\n\n  it('should show loading state', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', (req) => {\n      req.on('response', (res) => {\n        res.setDelay(2000);\n      });\n    }).as('getProductsSlow');\n\n    cy.visit('\u002Fproducts');\n    cy.get('[data-testid=\"loading-spinner\"]').should('be.visible');\n    cy.wait('@getProductsSlow');\n    cy.get('[data-testid=\"loading-spinner\"]').should('not.exist');\n  });\n\n  it('should send correct query parameters', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts*').as('getProducts');\n\n    cy.visit('\u002Fproducts');\n    cy.get('[data-testid=\"search-input\"]').type('laptop');\n    cy.get('[data-testid=\"search-button\"]').click();\n\n    cy.wait('@getProducts').then((interception) => {\n      expect(interception.request.url).to.include('q=laptop');\n    });\n  });\n});\n```\n\n### Working with Fixtures\n\n```json\n\u002F\u002F cypress\u002Ffixtures\u002Fusers.json\n{\n  \"validUser\": {\n    \"email\": \"user@example.com\",\n    \"password\": \"SecurePass123!\",\n    \"name\": \"Test User\"\n  },\n  \"adminUser\": {\n    \"email\": \"admin@example.com\",\n    \"password\": \"AdminPass123!\",\n    \"name\": \"Admin User\"\n  }\n}\n```\n\n```typescript\ndescribe('User management', () => {\n  beforeEach(() => {\n    cy.fixture('users.json').as('users');\n  });\n\n  it('should login with fixture data', function () {\n    const { email, password } = this.users.validUser;\n    cy.login(email, password);\n    cy.url().should('include', '\u002Fdashboard');\n  });\n});\n```\n\n### Form Testing\n\n```typescript\ndescribe('Registration form', () => {\n  beforeEach(() => {\n    cy.visit('\u002Fregister');\n  });\n\n  it('should validate required fields', () => {\n    cy.get('button[type=\"submit\"]').click();\n    cy.contains('Name is required').should('be.visible');\n    cy.contains('Email is required').should('be.visible');\n    cy.contains('Password is required').should('be.visible');\n  });\n\n  it('should validate email format', () => {\n    cy.get('#email').type('not-an-email');\n    cy.get('#email').blur();\n    cy.contains('Please enter a valid email').should('be.visible');\n  });\n\n  it('should validate password strength', () => {\n    cy.get('#password').type('123');\n    cy.get('#password').blur();\n    cy.contains('Password must be at least 8 characters').should('be.visible');\n  });\n\n  it('should complete registration successfully', () => {\n    cy.intercept('POST', '\u002Fapi\u002Fauth\u002Fregister', {\n      statusCode: 201,\n      body: { id: '123', email: 'new@example.com' },\n    }).as('register');\n\n    cy.get('#name').type('New User');\n    cy.get('#email').type('new@example.com');\n    cy.get('#password').type('SecurePass123!');\n    cy.get('#confirmPassword').type('SecurePass123!');\n    cy.get('button[type=\"submit\"]').click();\n\n    cy.wait('@register');\n    cy.url().should('include', '\u002Flogin');\n    cy.contains('Registration successful').should('be.visible');\n  });\n});\n```\n\n### File Upload\n\n```typescript\nit('should upload a file', () => {\n  cy.get('[data-testid=\"file-input\"]').selectFile('cypress\u002Ffixtures\u002Fsample.pdf');\n  cy.contains('sample.pdf').should('be.visible');\n  cy.get('[data-testid=\"upload-button\"]').click();\n  cy.contains('Upload successful').should('be.visible');\n});\n\nit('should drag and drop a file', () => {\n  cy.get('[data-testid=\"file-input\"]').selectFile('cypress\u002Ffixtures\u002Fimage.png', {\n    action: 'drag-drop',\n  });\n});\n```\n\n### Multi-Tab and Window Handling\n\n```typescript\nit('should handle links opening in new tab', () => {\n  \u002F\u002F Remove target=\"_blank\" to keep navigation in same tab\n  cy.get('a[data-testid=\"external-link\"]')\n    .invoke('removeAttr', 'target')\n    .click();\n\n  cy.url().should('include', '\u002Fexternal-page');\n});\n\nit('should verify external link href', () => {\n  cy.get('a[data-testid=\"external-link\"]')\n    .should('have.attr', 'href')\n    .and('include', 'https:\u002F\u002Fexternal-site.com');\n});\n```\n\n## Component Testing\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002FButton.cy.tsx\nimport { Button } from '.\u002FButton';\n\ndescribe('Button component', () => {\n  it('should render with correct text', () => {\n    cy.mount(\u003CButton>Click me\u003C\u002FButton>);\n    cy.contains('Click me').should('be.visible');\n  });\n\n  it('should handle click events', () => {\n    const onClick = cy.stub().as('onClick');\n    cy.mount(\u003CButton onClick={onClick}>Click me\u003C\u002FButton>);\n    cy.contains('Click me').click();\n    cy.get('@onClick').should('have.been.calledOnce');\n  });\n\n  it('should be disabled when disabled prop is true', () => {\n    cy.mount(\u003CButton disabled>Click me\u003C\u002FButton>);\n    cy.get('button').should('be.disabled');\n  });\n\n  it('should apply variant styles', () => {\n    cy.mount(\u003CButton variant=\"primary\">Primary\u003C\u002FButton>);\n    cy.get('button').should('have.class', 'btn-primary');\n  });\n});\n```\n\n## Best Practices\n\n1. **Use `cy.intercept()` over `cy.server()`\u002F`cy.route()`** -- The newer API is more powerful.\n2. **Prefer `cy.session()` for authentication** -- It caches session state across tests.\n3. **Use `data-testid` attributes** -- They survive refactoring better than class selectors.\n4. **Never use `cy.wait(ms)`** -- Use `cy.wait('@alias')` for network requests or assertions for DOM.\n5. **Keep tests independent** -- Do not rely on test execution order.\n6. **Use `beforeEach` not `before`** -- Each test should set up its own state.\n7. **Return nothing from Cypress commands** -- Commands are chainable, not promise-based.\n8. **Avoid conditional testing** -- Cypress tests should be deterministic.\n9. **Use API shortcuts for state setup** -- Use `cy.request()` to set up data instead of UI clicks.\n10. **Limit use of `.then()`** -- Most operations should be chainable assertions.\n\n## Anti-Patterns to Avoid\n\n1. **Using `async\u002Fawait`** -- Cypress commands are not Promises. They queue commands.\n2. **Assigning Cypress commands to variables** -- `const el = cy.get('.foo')` does not work as expected.\n3. **Using arbitrary waits** -- `cy.wait(5000)` is a guaranteed source of flakiness.\n4. **Visiting external sites** -- Cypress does not support cross-origin navigation well.\n5. **Testing third-party widgets directly** -- Stub them or use their test hooks.\n6. **Using `.then()` for simple assertions** -- Use `.should()` instead, which retries.\n7. **Deeply nested callbacks** -- Flatten your test logic; avoid callback hell.\n8. **Overusing `cy.wrap()`** -- Use it only when you genuinely need to wrap non-Cypress values.\n9. **Testing implementation details** -- Focus on what the user sees and does.\n10. **Running too many specs in a single file** -- Split large files by feature area.\n\n## Debugging Tips\n\n- Use `cy.log()` to print messages to the Cypress command log.\n- Use `cy.debug()` to pause and inspect in DevTools.\n- Use `cy.pause()` to step through commands one at a time.\n- Use `.then(console.log)` to inspect values during test execution.\n- Open Cypress in interactive mode: `npx cypress open`.\n- Check the Cypress command log sidebar for time-travel debugging.\n- Use `cy.screenshot()` to capture the current state for debugging.\n\n## CI Integration\n\n```yaml\n# .github\u002Fworkflows\u002Fcypress.yml\nname: Cypress Tests\non: [push, pull_request]\n\njobs:\n  cypress:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        browser: [chrome, firefox, edge]\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: cypress-io\u002Fgithub-action@v6\n        with:\n          browser: ${{ matrix.browser }}\n          start: npm run dev\n          wait-on: 'http:\u002F\u002Flocalhost:3000'\n          record: true\n        env:\n          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n```\n","# Cypress E2E Testing Skill\n\nYou are an expert QA automation engineer specializing in Cypress end-to-end testing. When the user asks you to write, review, or debug Cypress E2E tests, follow these detailed instructions.\n\n## Core Principles\n\n1. **Cypress is not Selenium** -- Cypress runs in the browser alongside the app. Embrace its architecture.\n2. **Commands are asynchronous but chainable** -- Never use `async\u002Fawait` with Cypress commands.\n3. **Retry-ability** -- Cypress automatically retries assertions. Lean on this feature.\n4. **Network control** -- Use `cy.intercept()` to control and assert on network requests.\n5. **Test isolation** -- Each test should start from a clean state. Use `cy.session()` for auth.\n\n## Project Structure\n\n```\ncypress\u002F\n  e2e\u002F\n    auth\u002F\n      login.cy.ts\n      signup.cy.ts\n    dashboard\u002F\n      dashboard.cy.ts\n    checkout\u002F\n      cart.cy.ts\n  fixtures\u002F\n    users.json\n    products.json\n  support\u002F\n    commands.ts\n    e2e.ts\n    component.ts\n  pages\u002F\n    login.page.ts\n    dashboard.page.ts\n  plugins\u002F\n    index.ts\ncypress.config.ts\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F cypress.config.ts\nimport { defineConfig } from 'cypress';\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: 'http:\u002F\u002Flocalhost:3000',\n    viewportWidth: 1280,\n    viewportHeight: 720,\n    defaultCommandTimeout: 10000,\n    requestTimeout: 15000,\n    responseTimeout: 30000,\n    retries: {\n      runMode: 2,\n      openMode: 0,\n    },\n    video: false,\n    screenshotOnRunFailure: true,\n    experimentalRunAllSpecs: true,\n    setupNodeEvents(on, config) {\n      \u002F\u002F Register plugins here\n      return config;\n    },\n  },\n  component: {\n    devServer: {\n      framework: 'react',\n      bundler: 'vite',\n    },\n    specPattern: 'src\u002F**\u002F*.cy.{ts,tsx}',\n  },\n});\n```\n\n## Custom Commands\n\n### Defining Custom Commands\n\n```typescript\n\u002F\u002F cypress\u002Fsupport\u002Fcommands.ts\ndeclare global {\n  namespace Cypress {\n    interface Chainable {\n      login(email: string, password: string): Chainable\u003Cvoid>;\n      loginByApi(email: string, password: string): Chainable\u003Cvoid>;\n      getByTestId(testId: string): Chainable\u003CJQuery\u003CHTMLElement>>;\n      shouldBeVisible(text: string): Chainable\u003Cvoid>;\n    }\n  }\n}\n\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.visit('\u002Flogin');\n  cy.get('[data-testid=\"email-input\"]').type(email);\n  cy.get('[data-testid=\"password-input\"]').type(password);\n  cy.get('[data-testid=\"login-button\"]').click();\n  cy.url().should('include', '\u002Fdashboard');\n});\n\nCypress.Commands.add('loginByApi', (email: string, password: string) => {\n  cy.request({\n    method: 'POST',\n    url: '\u002Fapi\u002Fauth\u002Flogin',\n    body: { email, password },\n  }).then((response) => {\n    window.localStorage.setItem('authToken', response.body.token);\n  });\n});\n\nCypress.Commands.add('getByTestId', (testId: string) => {\n  return cy.get(`[data-testid=\"${testId}\"]`);\n});\n```\n\n### Using `cy.session()` for Auth\n\n```typescript\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.session(\n    [email, password],\n    () => {\n      cy.visit('\u002Flogin');\n      cy.get('#email').type(email);\n      cy.get('#password').type(password);\n      cy.get('button[type=\"submit\"]').click();\n      cy.url().should('include', '\u002Fdashboard');\n    },\n    {\n      validate() {\n        cy.request('\u002Fapi\u002Fauth\u002Fme').its('status').should('eq', 200);\n      },\n    }\n  );\n});\n```\n\n## Page Object Pattern\n\n```typescript\n\u002F\u002F cypress\u002Fpages\u002Flogin.page.ts\nexport class LoginPage {\n  get emailInput() {\n    return cy.get('[data-testid=\"email-input\"]');\n  }\n\n  get passwordInput() {\n    return cy.get('[data-testid=\"password-input\"]');\n  }\n\n  get submitButton() {\n    return cy.get('[data-testid=\"login-button\"]');\n  }\n\n  get errorMessage() {\n    return cy.get('[data-testid=\"error-message\"]');\n  }\n\n  visit() {\n    cy.visit('\u002Flogin');\n    return this;\n  }\n\n  fillEmail(email: string) {\n    this.emailInput.clear().type(email);\n    return this;\n  }\n\n  fillPassword(password: string) {\n    this.passwordInput.clear().type(password);\n    return this;\n  }\n\n  submit() {\n    this.submitButton.click();\n    return this;\n  }\n\n  login(email: string, password: string) {\n    this.fillEmail(email);\n    this.fillPassword(password);\n    this.submit();\n    return this;\n  }\n\n  assertError(message: string) {\n    this.errorMessage.should('be.visible').and('contain.text', message);\n    return this;\n  }\n}\n\nexport const loginPage = new LoginPage();\n```\n\n## Writing Tests\n\n### Basic Test Structure\n\n```typescript\nimport { loginPage } from '..\u002Fpages\u002Flogin.page';\n\ndescribe('Login', () => {\n  beforeEach(() => {\n    loginPage.visit();\n  });\n\n  it('should login successfully with valid credentials', () => {\n    loginPage.login('user@example.com', 'SecurePass123!');\n    cy.url().should('include', '\u002Fdashboard');\n    cy.contains('Welcome back').should('be.visible');\n  });\n\n  it('should show error for invalid credentials', () => {\n    loginPage.login('user@example.com', 'wrongpassword');\n    loginPage.assertError('Invalid email or password');\n  });\n\n  it('should disable submit button when form is empty', () => {\n    loginPage.submitButton.should('be.disabled');\n  });\n});\n```\n\n### Network Intercept Patterns\n\n```typescript\ndescribe('Product listing', () => {\n  it('should display products from API', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', {\n      fixture: 'products.json',\n    }).as('getProducts');\n\n    cy.visit('\u002Fproducts');\n    cy.wait('@getProducts');\n\n    cy.get('[data-testid=\"product-card\"]').should('have.length', 3);\n  });\n\n  it('should show error state on API failure', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', {\n      statusCode: 500,\n      body: { error: 'Internal Server Error' },\n    }).as('getProductsFail');\n\n    cy.visit('\u002Fproducts');\n    cy.wait('@getProductsFail');\n\n    cy.contains('Something went wrong').should('be.visible');\n    cy.get('[data-testid=\"retry-button\"]').should('be.visible');\n  });\n\n  it('should show loading state', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts', (req) => {\n      req.on('response', (res) => {\n        res.setDelay(2000);\n      });\n    }).as('getProductsSlow');\n\n    cy.visit('\u002Fproducts');\n    cy.get('[data-testid=\"loading-spinner\"]').should('be.visible');\n    cy.wait('@getProductsSlow');\n    cy.get('[data-testid=\"loading-spinner\"]').should('not.exist');\n  });\n\n  it('should send correct query parameters', () => {\n    cy.intercept('GET', '\u002Fapi\u002Fproducts*').as('getProducts');\n\n    cy.visit('\u002Fproducts');\n    cy.get('[data-testid=\"search-input\"]').type('laptop');\n    cy.get('[data-testid=\"search-button\"]').click();\n\n    cy.wait('@getProducts').then((interception) => {\n      expect(interception.request.url).to.include('q=laptop');\n    });\n  });\n});\n```\n\n### Working with Fixtures\n\n```json\n\u002F\u002F cypress\u002Ffixtures\u002Fusers.json\n{\n  \"validUser\": {\n    \"email\": \"user@example.com\",\n    \"password\": \"SecurePass123!\",\n    \"name\": \"Test User\"\n  },\n  \"adminUser\": {\n    \"email\": \"admin@example.com\",\n    \"password\": \"AdminPass123!\",\n    \"name\": \"Admin User\"\n  }\n}\n```\n\n```typescript\ndescribe('User management', () => {\n  beforeEach(() => {\n    cy.fixture('users.json').as('users');\n  });\n\n  it('should login with fixture data', function () {\n    const { email, password } = this.users.validUser;\n    cy.login(email, password);\n    cy.url().should('include', '\u002Fdashboard');\n  });\n});\n```\n\n### Form Testing\n\n```typescript\ndescribe('Registration form', () => {\n  beforeEach(() => {\n    cy.visit('\u002Fregister');\n  });\n\n  it('should validate required fields', () => {\n    cy.get('button[type=\"submit\"]').click();\n    cy.contains('Name is required').should('be.visible');\n    cy.contains('Email is required').should('be.visible');\n    cy.contains('Password is required').should('be.visible');\n  });\n\n  it('should validate email format', () => {\n    cy.get('#email').type('not-an-email');\n    cy.get('#email').blur();\n    cy.contains('Please enter a valid email').should('be.visible');\n  });\n\n  it('should validate password strength', () => {\n    cy.get('#password').type('123');\n    cy.get('#password').blur();\n    cy.contains('Password must be at least 8 characters').should('be.visible');\n  });\n\n  it('should complete registration successfully', () => {\n    cy.intercept('POST', '\u002Fapi\u002Fauth\u002Fregister', {\n      statusCode: 201,\n      body: { id: '123', email: 'new@example.com' },\n    }).as('register');\n\n    cy.get('#name').type('New User');\n    cy.get('#email').type('new@example.com');\n    cy.get('#password').type('SecurePass123!');\n    cy.get('#confirmPassword').type('SecurePass123!');\n    cy.get('button[type=\"submit\"]').click();\n\n    cy.wait('@register');\n    cy.url().should('include', '\u002Flogin');\n    cy.contains('Registration successful').should('be.visible');\n  });\n});\n```\n\n### File Upload\n\n```typescript\nit('should upload a file', () => {\n  cy.get('[data-testid=\"file-input\"]').selectFile('cypress\u002Ffixtures\u002Fsample.pdf');\n  cy.contains('sample.pdf').should('be.visible');\n  cy.get('[data-testid=\"upload-button\"]').click();\n  cy.contains('Upload successful').should('be.visible');\n});\n\nit('should drag and drop a file', () => {\n  cy.get('[data-testid=\"file-input\"]').selectFile('cypress\u002Ffixtures\u002Fimage.png', {\n    action: 'drag-drop',\n  });\n});\n```\n\n### Multi-Tab and Window Handling\n\n```typescript\nit('should handle links opening in new tab', () => {\n  \u002F\u002F Remove target=\"_blank\" to keep navigation in same tab\n  cy.get('a[data-testid=\"external-link\"]')\n    .invoke('removeAttr', 'target')\n    .click();\n\n  cy.url().should('include', '\u002Fexternal-page');\n});\n\nit('should verify external link href', () => {\n  cy.get('a[data-testid=\"external-link\"]')\n    .should('have.attr', 'href')\n    .and('include', 'https:\u002F\u002Fexternal-site.com');\n});\n```\n\n## Component Testing\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002FButton.cy.tsx\nimport { Button } from '.\u002FButton';\n\ndescribe('Button component', () => {\n  it('should render with correct text', () => {\n    cy.mount(\u003CButton>Click me\u003C\u002FButton>);\n    cy.contains('Click me').should('be.visible');\n  });\n\n  it('should handle click events', () => {\n    const onClick = cy.stub().as('onClick');\n    cy.mount(\u003CButton onClick={onClick}>Click me\u003C\u002FButton>);\n    cy.contains('Click me').click();\n    cy.get('@onClick').should('have.been.calledOnce');\n  });\n\n  it('should be disabled when disabled prop is true', () => {\n    cy.mount(\u003CButton disabled>Click me\u003C\u002FButton>);\n    cy.get('button').should('be.disabled');\n  });\n\n  it('should apply variant styles', () => {\n    cy.mount(\u003CButton variant=\"primary\">Primary\u003C\u002FButton>);\n    cy.get('button').should('have.class', 'btn-primary');\n  });\n});\n```\n\n## Best Practices\n\n1. **Use `cy.intercept()` over `cy.server()`\u002F`cy.route()`** -- The newer API is more powerful.\n2. **Prefer `cy.session()` for authentication** -- It caches session state across tests.\n3. **Use `data-testid` attributes** -- They survive refactoring better than class selectors.\n4. **Never use `cy.wait(ms)`** -- Use `cy.wait('@alias')` for network requests or assertions for DOM.\n5. **Keep tests independent** -- Do not rely on test execution order.\n6. **Use `beforeEach` not `before`** -- Each test should set up its own state.\n7. **Return nothing from Cypress commands** -- Commands are chainable, not promise-based.\n8. **Avoid conditional testing** -- Cypress tests should be deterministic.\n9. **Use API shortcuts for state setup** -- Use `cy.request()` to set up data instead of UI clicks.\n10. **Limit use of `.then()`** -- Most operations should be chainable assertions.\n\n## Anti-Patterns to Avoid\n\n1. **Using `async\u002Fawait`** -- Cypress commands are not Promises. They queue commands.\n2. **Assigning Cypress commands to variables** -- `const el = cy.get('.foo')` does not work as expected.\n3. **Using arbitrary waits** -- `cy.wait(5000)` is a guaranteed source of flakiness.\n4. **Visiting external sites** -- Cypress does not support cross-origin navigation well.\n5. **Testing third-party widgets directly** -- Stub them or use their test hooks.\n6. **Using `.then()` for simple assertions** -- Use `.should()` instead, which retries.\n7. **Deeply nested callbacks** -- Flatten your test logic; avoid callback hell.\n8. **Overusing `cy.wrap()`** -- Use it only when you genuinely need to wrap non-Cypress values.\n9. **Testing implementation details** -- Focus on what the user sees and does.\n10. **Running too many specs in a single file** -- Split large files by feature area.\n\n## Debugging Tips\n\n- Use `cy.log()` to print messages to the Cypress command log.\n- Use `cy.debug()` to pause and inspect in DevTools.\n- Use `cy.pause()` to step through commands one at a time.\n- Use `.then(console.log)` to inspect values during test execution.\n- Open Cypress in interactive mode: `npx cypress open`.\n- Check the Cypress command log sidebar for time-travel debugging.\n- Use `cy.screenshot()` to capture the current state for debugging.\n\n## CI Integration\n\n```yaml\n# .github\u002Fworkflows\u002Fcypress.yml\nname: Cypress Tests\non: [push, pull_request]\n\njobs:\n  cypress:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        browser: [chrome, firefox, edge]\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: cypress-io\u002Fgithub-action@v6\n        with:\n          browser: ${{ matrix.browser }}\n          start: npm run dev\n          wait-on: 'http:\u002F\u002Flocalhost:3000'\n          record: true\n        env:\n          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n```\n",{"name":5,"tags":24,"agents":30,"author":41,"domains":42,"license":15,"version":44,"languages":45,"frameworks":48,"description":7,"testingTypes":49},[25,26,27,28,29],"cypress","e2e","web-testing","automation","component-testing",[31,32,33,34,35,36,37,38,39,40],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[43],"web","1.0.0",[46,47],"javascript","typescript",[25],[26],"main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fcypress-e2e","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Cypress E2E Testing\"",{"tool":64,"command":65},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Cypress E2E Testing\"",{"tool":67,"command":68},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Cypress E2E Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fcypress-e2e\u002FSKILL.md",true,[],[73,81,88,95,102,109],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]