qase-javascript-commons 2.6.0 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,15 @@
1
+ # qase-javascript-commons@2.6.2
2
+
3
+ ## Bug fixes
4
+
5
+ - Fixed Cypress failure classification in real browser environments. Cypress errors false-positive on the `"http"` non-assertion pattern because (a) browser stack traces contain URLs like `https://localhost/__cypress/runner/...` and (b) all error messages include docs links like `https://on.cypress.io/...`. The classifier now unconditionally trusts Cypress' retry-ability prefix (`Timed out retrying after Nms:`) as a genuine test failure signal, since this prefix is exclusive to DOM-interacting commands and never appears in infrastructure failures (`cy.request()`, `cy.task()`).
6
+
7
+ # qase-javascript-commons@2.6.1
8
+
9
+ ## Bug fixes
10
+
11
+ - Fixed Cypress test failures being classified as `invalid` instead of `failed`. Cypress uses retry-ability (`Timed out retrying after Nms: ...`) and command syntax (`cy.click() failed`, `cy.wait() timed out`) that don't contain the word `expect`, so genuine UI/command failures previously fell through to the timeout catch-all and were mislabeled as environment errors. `cy.request()` with infrastructure-level errors (e.g. `ECONNREFUSED`) continues to be classified as `invalid`.
12
+
1
13
  # qase-javascript-commons@2.6.0
2
14
 
3
15
  ## What's new
@@ -79,6 +79,11 @@ function isAssertionError(error, originalStatus) {
79
79
  // Check for non-assertion patterns (excluding timeout for special handling above)
80
80
  const nonAssertionPatternsWithoutTimeout = nonAssertionPatterns.filter(pattern => pattern !== 'timeout');
81
81
  const hasNonAssertionPattern = nonAssertionPatternsWithoutTimeout.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
82
+ // Cypress retry-ability prefix: "Timed out retrying after Nms:" is added by
83
+ // Cypress' retry mechanism exclusively for DOM-interacting commands (cy.get,
84
+ // cy.click, cy.should, cy.wait with aliases). It never appears in infra
85
+ // failures (cy.request, cy.task). This is the most reliable Cypress signal.
86
+ const isCypressRetryTimeout = /timed out retrying after \d+ms/.test(errorMessage);
82
87
  if (hasNonAssertionPattern) {
83
88
  const hasAssertionContext = assertionPatterns.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
84
89
  const isRunnerFailed = normalizedOriginalStatus === 'failed' || normalizedOriginalStatus === 'timedout' || normalizedOriginalStatus === 'interrupted';
@@ -88,8 +93,21 @@ function isAssertionError(error, originalStatus) {
88
93
  if (isRunnerFailed && hasAssertionContext && !isSyntaxError) {
89
94
  return true;
90
95
  }
96
+ // Cypress override: the retry-ability prefix is a strong signal that the
97
+ // test was actively interacting with the application via a retryable command.
98
+ // Cypress errors false-positive on "http" because (a) browser stack traces
99
+ // contain URLs and (b) all error messages include docs links
100
+ // (https://on.cypress.io/...). The retry prefix itself is never
101
+ // infrastructure, so we trust it unconditionally.
102
+ if (isCypressRetryTimeout && isRunnerFailed) {
103
+ return true;
104
+ }
91
105
  return false;
92
106
  }
107
+ // Cypress failure without any non-assertion pattern (clean stack trace)
108
+ if (isCypressRetryTimeout) {
109
+ return true;
110
+ }
93
111
  // For timeout errors without expect, treat as invalid
94
112
  if (errorMessage.includes('timeout')) {
95
113
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -63,7 +63,7 @@
63
63
  "@types/mime-types": "^2.1.4",
64
64
  "@types/minimatch": "^6.0.0",
65
65
  "@types/uuid": "^9.0.8",
66
- "axios": "^1.13.5",
66
+ "axios": "^1.15.0",
67
67
  "jest": "^29.7.0",
68
68
  "ts-jest": "^29.4.5"
69
69
  }