SEO_iamge_renamer_starting_.../cypress.config.js
DustyWalker 9b61f44090 fix: update workspace configuration for pnpm and Cypress ES modules
- Add pnpm-workspace.yaml to replace deprecated workspaces field
- Fix Cypress config to use ES module imports
- Update package dependencies for compatibility
- Enable proper workspace dependency management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-05 19:55:05 +02:00

82 lines
No EOL
1.9 KiB
JavaScript

import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
supportFile: 'cypress/support/e2e.ts',
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
videosFolder: 'cypress/videos',
screenshotsFolder: 'cypress/screenshots',
fixturesFolder: 'cypress/fixtures',
video: true,
screenshot: true,
viewportWidth: 1280,
viewportHeight: 720,
defaultCommandTimeout: 10000,
requestTimeout: 10000,
responseTimeout: 10000,
pageLoadTimeout: 30000,
env: {
API_URL: 'http://localhost:3001',
TEST_USER_EMAIL: 'test@example.com',
TEST_USER_PASSWORD: 'TestPassword123!',
},
setupNodeEvents(on, config) {
// implement node event listeners here
on('task', {
// Custom tasks for database setup/teardown
clearDatabase() {
// Clear test database
return null;
},
seedDatabase() {
// Seed test database with fixtures
return null;
},
log(message) {
console.log(message);
return null;
},
});
// Code coverage plugin
// require('@cypress/code-coverage/task')(on, config);
return config;
},
},
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
},
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'cypress/support/component.ts',
},
// Global configuration
chromeWebSecurity: false,
modifyObstructiveCode: false,
experimentalStudio: true,
experimentalWebKitSupport: true,
// Retry configuration
retries: {
runMode: 2,
openMode: 0,
},
// Reporter configuration
reporter: 'mochawesome',
reporterOptions: {
reportDir: 'cypress/reports',
overwrite: false,
html: false,
json: true,
},
});