-
Notifications
You must be signed in to change notification settings - Fork 68
Add ability to use custom labels in SpecFlow plugin #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to use custom labels in SpecFlow plugin #284
Conversation
Allure.Features/allureConfig.json
Outdated
| "owner": "^owner:?(.+)", | ||
| "severity": "^(normal|blocker|critical|minor|trivial)" | ||
| "severity": "^(normal|blocker|critical|minor|trivial)", | ||
| "label": "(.+)\\((.+)\\)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use same semantics as other labels better to make regex like this: "^label:([\w]+):(.+)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you can use internal property in PluginConfiguration this way:
internal string label => "^label:([\\w]+):(.+)";There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I'm not sure about
internal string label => "^label:([\w]+):(.+)";
Do we really need this? In this case we can't customize a regex pattern in the config file.
| }; | ||
| } | ||
|
|
||
| public static Label CustomLabel(string key, string value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add new method, you can simply use new Label { name = key, value = value } in SpecFlow adapter directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
Hello guys! We are very glad to see your contributions. Sounds funny because I pushed almost the same changes recently (f5ac293) :) Your PR looks really nice, just need to make some changes on review. 🍕 ❤️ |
Context
Can't use Layer, AllureId fields with SpecFlow Plugin
Checklist