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

Tags do not support colons #26

Closed cody1024d closed 3 years ago

cody1024d commented 3 years ago

Hello (again)!

I've found a small issue ---

If, for example I have the below:

@launchPage:Consumer18_4
  Scenario: Valid load
    ....

The tags property on the Scenario object, only shows having a tag of "launchPage". It seems to be leaving off the second part.

My use-case is, again from creating a framework point of view, I need the developers to be able to define extra meta-data about the scenario. In this case, this tag is performing 2 steps which are extremely boiler-platey that nearly all scenarios will have.

Thanks, Cody

Tyler-Keith-Thompson commented 3 years ago

Huh, you're right. I thought the official spec said tags were Alphanumeric but looking at the tests in the official cucumber repo it would appear _ is a valid character. I need to do a little digging to try and see if there's a gherkin language spec that says how this is supposed to work, I also need to adapt my tests that use the official Cucumber "good" JSON to read tags.

I'll start working on this ASAP.

Do you happen to know off-hand if a tag is:

I do know that @tag1@tag2 with no whitespace is valid, I've got explicit tests for that in the repo.

cody1024d commented 3 years ago

I'm not sure the exact grammar rules surrounding tags, unfortunately, although some tutorials I'm seeing online seem to only mention white-space as invalid characters.

For more context on the current situation (if needed):

cody1024d commented 3 years ago

Here are some useful links that I dug up, that may help. I'm not seeing anything on a skim through, in the granularity of characters, but maybe you can find something:

Language Spec

Also, here is the gherkin repo, which has a ReadMe that may help as well:

Gherkin Repo

Tyler-Keith-Thompson commented 3 years ago

CucumberSwift 3.1.2 fixes this issue. I'll leave this open until you've had a chance to validate on your end

cody1024d commented 3 years ago

Confirmed working! Thanks @Tyler-Keith-Thompson! Closing this issue.