@@ -11,6 +11,7 @@ module.exports = async function (workerCount, selectedRuns, options) {
1111 const passedTestArr = [ ] ;
1212 const failedTestArr = [ ] ;
1313 const skippedTestArr = [ ] ;
14+ const stepArr = [ ] ;
1415
1516 const { config : testConfig , override = '' } = options ;
1617 const overrideConfigs = tryOrDefault ( ( ) => JSON . parse ( override ) , { } ) ;
@@ -36,6 +37,14 @@ module.exports = async function (workerCount, selectedRuns, options) {
3637 suiteArr . push ( suite ) ;
3738 } ) ;
3839
40+ workers . on ( event . step . passed , ( step ) => {
41+ stepArr . push ( step ) ;
42+ } ) ;
43+
44+ workers . on ( event . step . failed , ( step ) => {
45+ stepArr . push ( step ) ;
46+ } ) ;
47+
3948 workers . on ( event . test . failed , ( test ) => {
4049 failedTestArr . push ( test ) ;
4150 output . test . failed ( test ) ;
@@ -53,6 +62,28 @@ module.exports = async function (workerCount, selectedRuns, options) {
5362
5463 workers . on ( event . all . result , ( ) => {
5564 // expose test stats after all workers finished their execution
65+ function addStepsToTest ( test , stepArr ) {
66+ stepArr . test . steps . forEach ( step => {
67+ if ( test . steps . length === 0 ) {
68+ test . steps . push ( step ) ;
69+ }
70+ } ) ;
71+ }
72+
73+ stepArr . forEach ( step => {
74+ passedTestArr . forEach ( test => {
75+ if ( step . test . title === test . title ) {
76+ addStepsToTest ( test , step ) ;
77+ }
78+ } ) ;
79+
80+ failedTestArr . forEach ( test => {
81+ if ( step . test . title === test . title ) {
82+ addStepsToTest ( test , step ) ;
83+ }
84+ } ) ;
85+ } ) ;
86+
5687 event . dispatcher . emit ( event . workers . result , {
5788 suites : suiteArr ,
5889 tests : {
0 commit comments