-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Question: Docstring transformation #176
Comments
Could you provide an example? |
@vitalets Yes sure, for example, I have step:
And make some callback 'fillPlaceholders' which should render this template and give me the output:
Under the hood... For usual string parameters, I can use |
At what moment I think API can be the following: defineDocStringType({
name: 'placeholders', // if empty -> applied to all docStrings
transformer: (s) => fillPlaceholders(s, { name: 'John', email: '[email protected]' });
}); And in feature file:
|
Yes, it would be good to have this API on runtime. |
Ok. Lets track in this issue. For now the only workaround I see is to make transformation inside step: When("I fill out the form:", async ({ page }, docStringTpl: string) => {
const docString = fillPlaceholders(docStringTpl, { name: 'John', email: '[email protected]' });
// ...
}); |
Is it possible to use a similar to the
defineParameterType
transformation for all docstrings?Or maybe you can suggest some workaround? I want to add some templating system across all docstrings.
The text was updated successfully, but these errors were encountered: