We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6887164 commit f9dbefaCopy full SHA for f9dbefa
1 file changed
packages/cypress/src/support.ts
@@ -131,6 +131,13 @@ function beforeEach(options: ArgosScreenshotOptions) {
131
};
132
}
133
134
+function getRetries(value: unknown) {
135
+ if (typeof value !== "number") {
136
+ return 0;
137
+ }
138
+ return Math.min(0, value);
139
+}
140
+
141
/**
142
* Wait for the UI to be ready before taking the screenshot.
143
*/
@@ -217,7 +224,7 @@ Cypress.Commands.add(
217
224
titlePath: Cypress.currentTest.titlePath,
218
225
retry: Cypress.currentRetry,
219
226
// @ts-expect-error - private property
220
- retries: cy.state("runnable")._retries,
227
+ retries: getRetries(cy.state("runnable")._retries),
221
228
},
222
229
browser: {
223
230
name: Cypress.browser.name,
0 commit comments