jest-allure2-adapter
Advanced tools
Comparing version 0.2.42 to 0.2.43
@@ -9,6 +9,9 @@ /// <reference types="node" /> | ||
private runningGroup; | ||
private groupStack; | ||
private groupNameStack; | ||
private stepStack; | ||
private currentStepStatus; | ||
private featureForSuite; | ||
private storyForSuite; | ||
private featureForTest; | ||
private storyForTest; | ||
private environmentInfo; | ||
@@ -63,4 +66,4 @@ constructor(config?: IAllureConfig); | ||
descriptionHtml(description: string): this; | ||
feature(feature: string): void; | ||
story(story: string): void; | ||
feature(feature: string): this; | ||
story(story: string): this; | ||
tag(tag: string): void; | ||
@@ -67,0 +70,0 @@ owner(owner: string): void; |
@@ -53,6 +53,10 @@ "use strict"; | ||
this.runningGroup = null; | ||
this.groupStack = []; | ||
// private groupStack: AllureGroup[] = []; | ||
this.groupNameStack = []; | ||
this.stepStack = []; | ||
this.currentStepStatus = null; | ||
this.featureForSuite = null; | ||
this.storyForSuite = null; | ||
this.featureForTest = null; | ||
this.storyForTest = null; | ||
this.environmentInfo = {}; | ||
@@ -81,3 +85,3 @@ } | ||
this.groupNameStack.push(name); | ||
this.groupStack.push(this.currentGroup); | ||
// this.groupStack.push(this.currentGroup); | ||
} | ||
@@ -182,6 +186,6 @@ // todo decorators | ||
} | ||
if (groups.length > 3) { | ||
this.currentTest.name = | ||
groups.slice(3).join(' > ') + ' \n >> ' + specDescritption; | ||
} | ||
/*if (groups.length > 3) { | ||
this.currentTest.name = | ||
groups.slice(3).join(' > ') + ' \n >> ' + specDescritption; | ||
}*/ | ||
} | ||
@@ -226,2 +230,11 @@ endTest(spec) { | ||
} | ||
if (this.featureForSuite && this.featureForTest == null) { | ||
super.feature(this.featureForSuite); | ||
} | ||
this.featureForTest = null; | ||
// todo | ||
if (this.storyForSuite && this.storyForTest == null) { | ||
super.story(this.storyForSuite); | ||
} | ||
this.storyForTest = null; | ||
this.currentTest.endTest(); | ||
@@ -249,3 +262,3 @@ } | ||
}); | ||
this.groupStack.pop(); | ||
// this.groupStack.pop(); | ||
this.groupNameStack.pop(); | ||
@@ -403,6 +416,24 @@ this.currentGroup.endGroup(); | ||
feature(feature) { | ||
super.feature(feature); | ||
if (this.runningTest !== null) { | ||
super.feature(feature); | ||
this.featureForTest = feature; | ||
return this; | ||
} | ||
if (this.featureForSuite) { | ||
throw new Error('Feature for suite can be set only once'); | ||
} | ||
this.featureForSuite = feature; | ||
return this; | ||
} | ||
story(story) { | ||
super.story(story); | ||
if (this.runningTest !== null) { | ||
super.story(story); | ||
this.storyForTest = story; | ||
return this; | ||
} | ||
if (this.storyForSuite) { | ||
throw new Error('Story for suite can be set only once'); | ||
} | ||
this.storyForSuite = story; | ||
return this; | ||
} | ||
@@ -409,0 +440,0 @@ tag(tag) { |
/// <reference types="node" /> | ||
/// <reference types="jest" /> | ||
import Reporter = jest.Reporter; | ||
import { AllureStep, Attachment, Category, ContentType, LinkType, Severity, Stage, Status, StepInterface, StatusDetails } from 'allure-js-commons'; | ||
@@ -87,3 +86,3 @@ import { AllureReporter } from './allure-reporter'; | ||
} | ||
export default class JestAllureReporter implements Reporter { | ||
export default class JestAllureReporter implements jest.Reporter { | ||
private reporterOptions; | ||
@@ -90,0 +89,0 @@ constructor(globalConfig: jest.GlobalConfig, options?: Partial<JestAllureReporter.ReporterConfig>); |
{ | ||
"name": "jest-allure2-adapter", | ||
"version": "0.2.42", | ||
"version": "0.2.43", | ||
"description": "Allure 2 Adapter for jest", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
@@ -241,5 +241,8 @@ # Jest-Allure-2 reporting plugin | ||
0.2.4x | ||
0.2.23 default and custom reporter, timestamps in steps | ||
#### 0.2.43: feature for suite / story for suite | ||
#### 0.2.42: step status and status details | ||
#### 0.2.23 [stable] default and custom reporter, timestamps in steps | ||
## Contributors | ||
@@ -246,0 +249,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34501
708
252