File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change
1
+ ### 1.0.11
2
+
3
+ - More fixes for Codeceptjs >= 3.4.0
4
+
5
+ ---
6
+
1
7
### 1.0.10
2
8
3
9
- Fix reporter to work with Codeceptjs 3.4.0 Cucumber update
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ module.exports = function (config) {
198
198
const clonedBackground = _ . cloneDeep ( backgroundSteps ) ;
199
199
reportScenarioObject . steps = [ ...clonedBackground , ...steps ] ;
200
200
201
- if ( codeceptScenarioObject . examples === undefined ) {
201
+ if ( codeceptScenarioObject . examples === undefined || codeceptScenarioObject . examples . length === 0 ) {
202
202
allScenarios . push ( reportScenarioObject ) ;
203
203
} else {
204
204
const separatedOutlines = separateScenarioOutline ( codeceptScenarioObject , reportScenarioObject ) ;
@@ -262,8 +262,25 @@ module.exports = function (config) {
262
262
embeddings : [ ] ,
263
263
} ;
264
264
265
+ // update to handle codecept >= 3.4.0
266
+ const buildArgument = ( ) => {
267
+ let arg = null ;
268
+ if ( codeceptStepObject . docString ) {
269
+ arg = {
270
+ type : 'DocString' ,
271
+ content : codeceptStepObject . docString . content ,
272
+ } ;
273
+ }
274
+ if ( codeceptStepObject . dataTable ) {
275
+ arg = {
276
+ type : 'DataTable' ,
277
+ ...codeceptStepObject . dataTable ,
278
+ } ;
279
+ }
280
+ return arg ;
281
+ } ;
265
282
// get all arguments for a step
266
- const { argument } = codeceptStepObject ;
283
+ const argument = codeceptStepObject . argument || buildArgument ( ) ;
267
284
if ( argument ) reportStep . arguments . push ( getArgumentsFromCodecept ( argument ) ) ;
268
285
allSteps . push ( reportStep ) ;
269
286
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codeceptjs-cucumber-json-reporter" ,
3
- "version" : " 1.0.10 " ,
3
+ "version" : " 1.0.11 " ,
4
4
"description" : " CodeceptJS plugin to generate a cucumberjs json output" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments