ποΈ Project Structure
Overview
This section explains the organization of files and folders in the cypress-ai-automation repository to help you understand how the project is structured.
Root Directory Structure
cypress-ai-automation/
βββ π cypress/ # Main testing framework
βββ π node_modules/ # NPM dependencies (auto-generated)
βββ π qa/ # Documentation folder
βββ π .gitignore # Git ignore patterns
βββ π cypress.config.js # Cypress configuration
βββ π package.json # Project metadata & scripts
βββ π package-lock.json # Dependency lock file
Cypress Directory Structure
π /cypress/
The main testing framework directory:
cypress/
βββ π downloads/ # Files downloaded during tests
βββ π fixtures/ # Test data
βββ π integration/ # Test specification files
β βββ π examples/ # AI website test cases
βββ π reports/ # Generated test reports
βββ π screenshots/ # Failure screenshots
βββ π support/ # Custom commands and utilities
βββ π videos/ # Test execution recordings
π /cypress/integration/examples/
Contains the main test files:
examples/
βββ π AIWebsite.PublishedSite.test.js # Frontend testing (597 lines)
βββ π AIWebsite.WP-Admin.test.js # WordPress admin testing (321 lines)
What each file does:
AIWebsite.PublishedSite.test.js
: Tests the frontend of published AI websitesAIWebsite.WP-Admin.test.js
: Tests WordPress admin panel functionality
π /cypress/support/
Contains support files and custom commands:
support/
βββ π commands.js # Custom Cypress commands
βββ π e2e.js # E2E test configuration
Key files:
commands.js
: Custom commands likehandlePopups()
for managing dynamic contente2e.js
: Global configuration and imports for E2E testing
π /cypress/fixtures/
Test data storage:
fixtures/
βββ π example.json # Sample test data structure
Configuration Files
π cypress.config.js
Main Cypress configuration file that contains:
- Timeouts: Extended timeouts for AI website testing
- Security: Chrome web security disabled for testing
- Reporting: Mochawesome reporter configuration
- File Patterns: Spec pattern for test discovery
π package.json
Project metadata containing:
- Dependencies: Cypress, mochawesome reporter, dotenv
- Scripts: Pre-defined commands for running tests
- Project Information: Name, version, description
Generated Directories
π /cypress/reports/
Auto-generated test reports:
- HTML Reports: Visual test results for viewing in browser
- JSON Reports: Machine-readable test data
- Assets: Screenshots and supporting files
π /cypress/screenshots/
Failure screenshots organized by:
- Test file name
- Timestamp
- Failure context
π /cypress/videos/
Test execution recordings (optional):
- Full test run videos
- Organized by test suite
File Naming Conventions
Test Files
- Pattern:
[Component].[TestType].test.js
- Examples:
AIWebsite.PublishedSite.test.js
AIWebsite.WP-Admin.test.js
Support Files
- Pattern:
[functionality].js
- Examples:
commands.js
- Custom commandse2e.js
- E2E configuration
Last updated on