-
-
Notifications
You must be signed in to change notification settings - Fork 10
perf(e2e): optimize Cypress tests - 30-40% faster execution #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
c30ccad
e8315a1
0413b4a
57ec503
0c88c20
b5f728a
bf8bf30
071d6c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,14 +20,14 @@ export default defineConfig({ | |||||
| screenshotsFolder: REPORTS.screenshots, | ||||||
| videosFolder: REPORTS.videos, | ||||||
| experimentalMemoryManagement: true, | ||||||
| video: true, | ||||||
| video: false, // Disable video by default to save time - can be enabled via env var | ||||||
|
||||||
| video: false, // Disable video by default to save time - can be enabled via env var | |
| video: process.env.CYPRESS_VIDEO === 'true' || false, // Disable video by default to save time - can be enabled via env var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in bf8bf30. Video recording now reads from CYPRESS_VIDEO environment variable: video: process.env.CYPRESS_VIDEO === 'true' || false
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The retries configuration is defined twice - at the top level (lines 28-31) and again within the e2e configuration (lines 202-205). This duplication is redundant. Remove one of these declarations to maintain cleaner configuration and prevent potential conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in bf8bf30. Removed duplicate retries configuration from top level, kept only in e2e section. Also removed duplicate experimentalMemoryManagement from e2e section, kept only at top level.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,41 +14,51 @@ describe("Widget UI/UX Screenshots", () => { | |||||||||
| const viewportWidth = 1920; | ||||||||||
| const viewportHeight = 1080; | ||||||||||
|
|
||||||||||
| // Essential widgets to capture in different themes | ||||||||||
| // Reduced to only critical widgets to capture - reduces test time significantly | ||||||||||
| const essentialWidgets = [ | ||||||||||
| "security-level", | ||||||||||
| "business-impact", | ||||||||||
| "security-summary", | ||||||||||
| "compliance-status", | ||||||||||
| "technical-details", | ||||||||||
| "security-visualization", | ||||||||||
| "value-creation", | ||||||||||
| ]; | ||||||||||
|
|
||||||||||
| // Only run screenshot tests when explicitly enabled or on scheduled runs | ||||||||||
| before(function() { | ||||||||||
| if (!Cypress.env('CAPTURE_SCREENSHOTS') && Cypress.config('isInteractive')) { | ||||||||||
| cy.log('Skipping screenshot tests - set CAPTURE_SCREENSHOTS=true to enable'); | ||||||||||
|
||||||||||
| if (!Cypress.env('CAPTURE_SCREENSHOTS') && Cypress.config('isInteractive')) { | |
| cy.log('Skipping screenshot tests - set CAPTURE_SCREENSHOTS=true to enable'); | |
| if (Cypress.env('CYPRESS_SCREENSHOTS') !== 'true' && Cypress.config('isInteractive')) { | |
| cy.log('Skipping screenshot tests - set CYPRESS_SCREENSHOTS=true to enable'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in bf8bf30. Standardized to use CYPRESS_SCREENSHOTS environment variable across all test files for consistency. Changed check to: if (Cypress.env('CYPRESS_SCREENSHOTS') !== 'true' && Cypress.config('isInteractive'))
Uh oh!
There was an error while loading. Please reload this page.