So I have this feature in cucumberjs
Scenario: Upload a valid pcf file into gpe
Given that the user uploads a valid pcf file
Then the user should see an upload success indicator
Scenario: Upload an invalid pcf file
Given that the user uploads an invalid pcf file
Then the user should see an upload error message
As you can see that the then are almost the same except for the string after upload. So I wrote a my then like this:
this.Then(/^that the user uploads [a-zA-Z]+/, ( option ) => {
console.log( option );
} );
But option displays function: finish. How can I get the string after the uploads word?