diff --git a/.yarn/versions/71226066.yml b/.yarn/versions/71226066.yml new file mode 100644 index 000000000..d1d3376af --- /dev/null +++ b/.yarn/versions/71226066.yml @@ -0,0 +1,13 @@ +undecided: + - allure-js + - allure-codeceptjs + - allure-cucumberjs + - allure-cypress + - allure-decorators + - allure-jasmine + - allure-jest + - allure-js-commons + - allure-mocha + - allure-playwright + - allure-vitest + - hermione-allure diff --git a/package.json b/package.json index ef2831f53..f049aa9f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "allure-js", - "version": "2.14.0", + "version": "2.14.1", "private": true, "workspaces": [ "packages/*" diff --git a/packages/allure-codeceptjs/package.json b/packages/allure-codeceptjs/package.json index 6f3111a21..e53b7fbe1 100644 --- a/packages/allure-codeceptjs/package.json +++ b/packages/allure-codeceptjs/package.json @@ -1,6 +1,6 @@ { "name": "allure-codeceptjs", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure codeceptjs integration", "keywords": [ "codeceptjs", diff --git a/packages/allure-cucumberjs/package.json b/packages/allure-cucumberjs/package.json index 4deeef00a..71127d38e 100644 --- a/packages/allure-cucumberjs/package.json +++ b/packages/allure-cucumberjs/package.json @@ -1,6 +1,6 @@ { "name": "allure-cucumberjs", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Cucumber.JS integration", "homepage": "https://allurereport.org/", "repository": { diff --git a/packages/allure-cypress/package.json b/packages/allure-cypress/package.json index aecb99ffd..5c52a9539 100644 --- a/packages/allure-cypress/package.json +++ b/packages/allure-cypress/package.json @@ -1,6 +1,6 @@ { "name": "allure-cypress", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Cypress integration", "keywords": [ "cypress", diff --git a/packages/allure-cypress/src/reporter.ts b/packages/allure-cypress/src/reporter.ts index 2059acae2..be7a064f6 100644 --- a/packages/allure-cypress/src/reporter.ts +++ b/packages/allure-cypress/src/reporter.ts @@ -75,10 +75,10 @@ export const allureCypress = (on: Cypress.PluginEvents, config?: AllureCypressCo } if (type === MessageType.METADATA) { - const { parameter, links, attachments, ...metadata } = payload; + const { parameter = [], links = [], attachments, ...metadata } = payload; const currentStep = currentSteps[currentSteps.length - 1]; - parameter?.forEach(({ name, value, excluded, mode }) => { + parameter.forEach(({ name, value, excluded, mode }) => { currentTest.parameter(name, value, { excluded, mode, @@ -90,12 +90,15 @@ export const allureCypress = (on: Cypress.PluginEvents, config?: AllureCypressCo (currentStep || currentTest).addAttachment(attachment.name, attachment.type, attachmentName); }); - if (!config?.links?.length || !links?.length) { - currentTest.applyMetadata(metadata); + if (!config?.links?.length) { + currentTest.applyMetadata({ + ...metadata, + links, + }); return; } - const formattedLinks: Link[] = links?.map((link) => { + const formattedLinks: Link[] = links.map((link) => { const matcher = config?.links?.find?.((item) => item.type === link.type); if (!matcher || link.url.startsWith("http")) { diff --git a/packages/allure-decorators/package.json b/packages/allure-decorators/package.json index efe71b853..530a46eb2 100644 --- a/packages/allure-decorators/package.json +++ b/packages/allure-decorators/package.json @@ -1,6 +1,6 @@ { "name": "allure-decorators", - "version": "2.14.0", + "version": "2.14.1", "description": "Write your tests in a Java-like annotation-driven manner via JS decorators.", "keywords": [ "typescript", diff --git a/packages/allure-jasmine/package.json b/packages/allure-jasmine/package.json index 6262e54ac..6022dd2db 100644 --- a/packages/allure-jasmine/package.json +++ b/packages/allure-jasmine/package.json @@ -1,6 +1,6 @@ { "name": "allure-jasmine", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Jasmine integration", "homepage": "https://allurereport.org/", "repository": { diff --git a/packages/allure-jest/package.json b/packages/allure-jest/package.json index 59bbfef31..6074111e9 100644 --- a/packages/allure-jest/package.json +++ b/packages/allure-jest/package.json @@ -1,6 +1,6 @@ { "name": "allure-jest", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Jest integration", "keywords": [ "jest", diff --git a/packages/allure-js-commons/package.json b/packages/allure-js-commons/package.json index 2f4002beb..83ee6c78f 100644 --- a/packages/allure-js-commons/package.json +++ b/packages/allure-js-commons/package.json @@ -1,6 +1,6 @@ { "name": "allure-js-commons", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure JS Commons", "homepage": "https://allurereport.org/", "repository": { diff --git a/packages/allure-mocha/package.json b/packages/allure-mocha/package.json index 1d39e6975..3c6c1c4af 100644 --- a/packages/allure-mocha/package.json +++ b/packages/allure-mocha/package.json @@ -1,6 +1,6 @@ { "name": "allure-mocha", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Mocha integration", "keywords": [ "mocha", diff --git a/packages/allure-playwright/package.json b/packages/allure-playwright/package.json index d1490dbf7..11aa9626a 100644 --- a/packages/allure-playwright/package.json +++ b/packages/allure-playwright/package.json @@ -1,6 +1,6 @@ { "name": "allure-playwright", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Playwright integration", "keywords": [ "playwright", diff --git a/packages/allure-vitest/package.json b/packages/allure-vitest/package.json index fd0a9ac33..d37556f6d 100644 --- a/packages/allure-vitest/package.json +++ b/packages/allure-vitest/package.json @@ -1,6 +1,6 @@ { "name": "allure-vitest", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Vitest integration", "keywords": [ "vitest", diff --git a/packages/allure-vitest/src/reporter.ts b/packages/allure-vitest/src/reporter.ts index 8db1fd0db..1a24e00f0 100644 --- a/packages/allure-vitest/src/reporter.ts +++ b/packages/allure-vitest/src/reporter.ts @@ -167,15 +167,7 @@ export default class AllureReporter implements Reporter { } } - const actualDuration = task.result - ? Math.max(0, task.file.collectDuration || 0) + - Math.max(0, task.file.setupDuration || 0) + - Math.max(0, task.result?.duration || 0) + - Math.max(0, task.file.environmentLoad || 0) + - Math.max(0, task.file.prepareDuration || 0) - : 0; - test.calculateHistoryId(); - test.endTest(task.result.startTime + actualDuration); + test.endTest(task.result.startTime + task.result?.duration || 0); } } diff --git a/packages/hermione-allure/package.json b/packages/hermione-allure/package.json index f93623715..02d1a61a1 100644 --- a/packages/hermione-allure/package.json +++ b/packages/hermione-allure/package.json @@ -1,6 +1,6 @@ { "name": "hermione-allure", - "version": "2.14.0", + "version": "2.14.1", "keywords": [ "hermione", "typescript", diff --git a/packages/newman-reporter-allure/package.json b/packages/newman-reporter-allure/package.json index cf0b8d227..8f23d395b 100644 --- a/packages/newman-reporter-allure/package.json +++ b/packages/newman-reporter-allure/package.json @@ -1,6 +1,6 @@ { "name": "newman-reporter-allure", - "version": "2.14.0", + "version": "2.14.1", "description": "Allure Newman integration", "keywords": [ "allure",