chore(claude): Add claude skill for Hugo development/testing workflow. Split ui-dev subagent into hugo-, ts-, and testing-specific agents.

claude/api-code-samples-plan-MEkQO
Jason Stirnaman 2025-12-05 10:27:02 -06:00
parent 29bfeb559c
commit e282e03cfb
2 changed files with 2 additions and 49 deletions

View File

@ -50,7 +50,7 @@ node cypress/support/run-e2e-specs.js \
# Run against a URL (for running server)
node cypress/support/run-e2e-specs.js \
--spec "cypress/e2e/content/my-test.cy.js" \
http://localhost:<port>/path/to/page/
http://localhost:1313/path/to/page/
# Run all E2E tests
yarn test:e2e

View File

@ -432,7 +432,7 @@ node cypress/support/run-e2e-specs.js \
```bash
node cypress/support/run-e2e-specs.js \
--spec "cypress/e2e/content/api-reference.cy.js" \
http://localhost:<port>/influxdb3/core/reference/api/
http://localhost:1313/influxdb3/core/reference/api/
```
**Example Cypress test structure for API reference:**
@ -467,53 +467,6 @@ describe('API Reference Documentation', () => {
});
```
**Check for JavaScript console errors (common pattern for feature development):**
```javascript
// cypress/e2e/content/my-component.cy.js
describe('My Component', () => {
it('should not throw JavaScript console errors', () => {
cy.visit('/path/to/page/');
// Wait for component to initialize
cy.get('[data-component="my-component"]', { timeout: 5000 })
.should('be.visible');
cy.window().then((win) => {
const logs = [];
const originalError = win.console.error;
// Intercept console.error calls
win.console.error = (...args) => {
logs.push(args.join(' '));
originalError.apply(win.console, args);
};
// Allow time for async operations
cy.wait(2000);
cy.then(() => {
// Filter for relevant errors (customize for your component)
const relevantErrors = logs.filter(
(log) =>
log.includes('my-component') ||
log.includes('Failed to parse') ||
log.includes('is not a function')
);
expect(relevantErrors).to.have.length(0);
});
});
});
});
```
This pattern is especially useful for catching:
- TypeScript/JavaScript runtime errors in components
- JSON parsing failures from `data-*` attributes
- Undefined function calls from missing imports
- Template data binding issues that only manifest at runtime
**Integrate Cypress into development workflow:**
1. Create test file in `cypress/e2e/content/` for your feature