Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
74 stars 19 forks source link

Cucumber Expressions containing plain texts are mismatched #52

Closed hkingverily closed 2 years ago

hkingverily commented 2 years ago

Describe the bug Cucumber Expressions containing plain texts are mismatched

To Reproduce Codes to reproduce the behavior:

Feature file: Given the member has A And the member has B And the member has C

CucumberSwift code: Given("the member has A" as CucumberExpression) { , in print("Print the member has A") } Given("the member has B" as CucumberExpression) { , in print("Print the member has B") } Given("the member has C" as CucumberExpression) { , in print("Print the member has C") }

Expected output ... Print the member has A ... Print the member has B ... Print the member has C ...

Actual output ... t = 26.88s Given the member has A Print the member has C ... t = 0.03s Given the member has B Print the member has C ... t = 0.03s Given the member has C Print the member has C ...

Additional context

Tyler-Keith-Thompson commented 2 years ago

Well that's an embarrassing oversight. The expressions library was assuming matches if there weren't any parameters found. I'll have this fixed shortly.

Good catch, thanks!

Tyler-Keith-Thompson commented 2 years ago

Alright, CucumberSwiftExpressions v0.0.8 fixes this. If you're using CocoaPods you can run pod update CucumberSwiftExpressions or if. you're using SPM you can update your packages. I'm also releasing a new version of CucumberSwift that declares v0.0.8 as a minimum version for CucumberSwiftExpressions.