File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ module.exports = function (config, reporter) {
2222 'iterations' : [ ] ,
2323 'testInfo' : { }
2424 } ;
25+ const metadata = testCase [ 0 ] . pair . metadata ;
26+ const projectKey = metadata ? metadata [ 0 ] . split ( '-' ) [ 0 ] : '' ;
2527
2628 testCase . forEach ( ( testedViewport ) => {
2729 let { pair : { viewportLabel : name } , status } = testedViewport ;
@@ -32,23 +34,26 @@ module.exports = function (config, reporter) {
3234 }
3335 xrayTestResult . iterations . push ( { name, status } ) ;
3436 } ) ;
35-
3637 xrayTestResult . status = testStatus ;
37- xrayTestResult . testInfo . requirementKeys = testCase [ 0 ] . pair . metadata ;
38+ xrayTestResult . testInfo . requirementKeys = metadata ;
39+ xrayTestResult . testInfo . projectKey = projectKey ;
3840 xrayTestResult . testInfo . summary = testCase [ 0 ] . pair . label ;
3941 xrayTestResult . testInfo . type = "Generic" ;
4042 transformedTestCases . push (
4143 xrayTestResult
4244 ) ;
4345 }
4446
47+ debugger ;
4548 return transformedTestCases ;
4649 }
4750
4851 function transformToXrayJson ( json ) {
4952 const results = { }
5053 const namedTestCases = _ . groupBy ( json , 'pair.label' ) ;
51- return results . tests = transformTestCases ( namedTestCases ) ;
54+
55+ results . tests = transformTestCases ( namedTestCases ) ;
56+ return results ;
5257 }
5358
5459 logger . log ( 'Writing Xray json report' ) ;
You can’t perform that action at this time.
0 commit comments