Skip to content

Commit

Permalink
fix: fixed attachment issue for failed tests on Windows
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
gibiw committed Jan 29, 2025
1 parent e76c5a8 commit ffb2061
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions qase-cypress/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# cypress-qase-reporter@2.2.8

## What's new

Fixed an issue where attachments were not properly linked to failed tests on Windows.

# cypress-qase-reporter@2.2.7

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qase-cypress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress-qase-reporter",
"version": "2.2.7",
"version": "2.2.8",
"description": "Qase Cypress Reporter",
"homepage": "https://github.com/qase-tms/qase-javascript",
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions qase-cypress/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export class CypressQaseReporter extends reporters.Base {
const file = test.parent ? this.getFile(test.parent) : undefined;

if (file) {
signature = file.split('/').join('::');
signature = file.split(path.sep).join('::');
}

if (test.parent) {
Expand Down Expand Up @@ -293,7 +293,7 @@ export class CypressQaseReporter extends reporters.Base {
return '';
}

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

return fileName ? fileName : '';
Expand Down

0 comments on commit ffb2061

Please sign in to comment.