Skip to content

Commit ffb2061

Browse files
committed
fix: fixed attachment issue for failed tests on Windows
- Resolved an issue where attachments were not being added to failed tests on Windows due to incorrect file paths. - Used `path.sep` to ensure cross-platform compatibility.
1 parent e76c5a8 commit ffb2061

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

qase-cypress/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2+
3+
## What's new
4+
5+
Fixed an issue where attachments were not properly linked to failed tests on Windows.
6+
17
28

39
## What's new

qase-cypress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cypress-qase-reporter",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"description": "Qase Cypress Reporter",
55
"homepage": "https://github.com/qase-tms/qase-javascript",
66
"sideEffects": false,

qase-cypress/src/reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class CypressQaseReporter extends reporters.Base {
265265
const file = test.parent ? this.getFile(test.parent) : undefined;
266266

267267
if (file) {
268-
signature = file.split('/').join('::');
268+
signature = file.split(path.sep).join('::');
269269
}
270270

271271
if (test.parent) {
@@ -293,7 +293,7 @@ export class CypressQaseReporter extends reporters.Base {
293293
return '';
294294
}
295295

296-
const pathParts = file.split('/');
296+
const pathParts = file.split(path.sep);
297297
const fileName = pathParts[pathParts.length - 1];
298298

299299
return fileName ? fileName : '';

0 commit comments

Comments
 (0)