Skip to content
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

Patterns / rules to name features / scenarios #33

Open
dkarlovi opened this issue Mar 27, 2024 · 7 comments
Open

Patterns / rules to name features / scenarios #33

dkarlovi opened this issue Mar 27, 2024 · 7 comments

Comments

@dkarlovi
Copy link
Contributor

dkarlovi commented Mar 27, 2024

It would be nice to be able to establish patterns when naming scenarios and features, promoting consistent vocabulary and wordings.

Some ideas:

  • based on where in the hierarchy it is (in folder structure, features in scenario matching name)
  • based on tags, for example all features which contain @tag must match pattern
@dantleech
Copy link
Owner

happy to receive PRs, I guess the above two are one in the same?

{
   "rules": {
        "name-pattern": {
            "type": "scenario",
            "path": "feature/sales/*",
            "match": "Foobar.*$",
            "tags": ["order"],
         }
   }
}

or whatever

@dkarlovi
Copy link
Contributor Author

I think so, yes, your example looks good, we can treat the selector like AND.

Maybe more explicit?

{
   "rules": {
        "name-pattern": {
            "selector": {
                "type": "scenario",
                "path": "feature/sales/*",
                "tags": ["order"]
             },
             "match": "Foobar.*$",
         }
   }
}

@dkarlovi
Copy link
Contributor Author

Ah, it needs to be an array since you'll have more of them, of course.

@dantleech
Copy link
Owner

could maybe replace Invoke:: with Valinor too to be able to actually support more advanced configuration schemas if necessary.

@dkarlovi
Copy link
Contributor Author

Not sure what you mean exactly?

@dantleech
Copy link
Owner

dantleech commented Mar 27, 2024

You would if you tried to add this rule I think, it's the way the config is mapped to the Rule's config DTO. I think my "deserializer" (invoke) is pretty basic.

@dkarlovi
Copy link
Contributor Author

Ah, got it. We can add the more advanced mapper first and then do the names thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants