File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ Feature: Error formatting
54
54
"""
55
55
import {Given} from 'cucumber'
56
56
57
- Given(/^a basic step$/, function() {})
57
+ Given(/^a basic step$/, function() { this.attach('Basic info.') })
58
58
Given(/^a step with a doc string$/, function(str) {})
59
59
Given(/^a pending step$/, function() { return 'pending' })
60
60
"""
@@ -65,6 +65,7 @@ Feature: Error formatting
65
65
66
66
1) Scenario: some scenario # features/a.feature:3
67
67
✔ Given a basic step # features/step_definitions/cucumber_steps.js:3
68
+ ℹ Basic info.
68
69
✔ And a step with a doc string # features/step_definitions/cucumber_steps.js:4
69
70
\"\"\"
70
71
my doc string
Original file line number Diff line number Diff line change @@ -91,8 +91,21 @@ function formatStep({
91
91
if ( actionLocation ) {
92
92
text += ` # ${ colorFns . location ( formatLocation ( actionLocation ) ) } `
93
93
}
94
+
94
95
text += '\n'
95
96
97
+ if ( Array . isArray ( testStep . attachments ) ) {
98
+ testStep . attachments
99
+ . filter ( ( { media } ) => media . type === 'text/plain' )
100
+ . forEach ( ( { data } ) => {
101
+ text +=
102
+ indentString (
103
+ colorFns [ Status . UNDEFINED ] ( figures . info + ' ' + data ) ,
104
+ 4
105
+ ) + '\n'
106
+ } )
107
+ }
108
+
96
109
if ( pickleStep ) {
97
110
let str
98
111
const iterator = buildStepArgumentIterator ( {
You can’t perform that action at this time.
0 commit comments