The Problem
My team often writes a significant amount of detail the Rule definitions in our feature files. We keep our Feature and Scenario descriptions very succinct and instead put business rules underneath the Rule headings. However, since each Rule generates a describe(...textContents) block, it makes the cli output virtually unreadable and very hard to parse. Is it possible to have some configuration option to manage how a test suite is structured for a given feature file hierarchy.
Proposed Solution
I was thinking you could expand the concept currently seen in examplesTitleFormat? to be just titleFormat?, and it would take the following object:
interface TitleFormat {
feature?: string | null,
rule?: string | null,
scenarioOutline?: string | null,
scenario?: string,
example?: string,
}
This would allow anything that maps to a describe block to be provided null, which would mean that it would map to an anonymous describe group.
Anything not provided would use the default behavior. To clarify, neither scenario nor example could be provided null, as playwright does not allow the test block itself to be anonymous.
This way I could accomplish what I wanted by providing:
{
titleFormat: {
rule: null,
}
}
But if another company instead used the Feature line to hold business requirements and the Rule/Scenario to distinguish to test case, they could instead do:
{
titleFormat: {
feature: null
}
}
Additional Context
No response
Priority Level
Medium
The Problem
My team often writes a significant amount of detail the
Ruledefinitions in our feature files. We keep ourFeatureandScenariodescriptions very succinct and instead put business rules underneath theRuleheadings. However, since eachRulegenerates adescribe(...textContents)block, it makes the cli output virtually unreadable and very hard to parse. Is it possible to have some configuration option to manage how a test suite is structured for a given feature file hierarchy.Proposed Solution
I was thinking you could expand the concept currently seen in
examplesTitleFormat?to be justtitleFormat?, and it would take the following object:This would allow anything that maps to a
describeblock to be providednull, which would mean that it would map to an anonymous describe group.Anything not provided would use the default behavior. To clarify, neither scenario nor example could be provided
null, as playwright does not allow thetestblock itself to be anonymous.This way I could accomplish what I wanted by providing:
But if another company instead used the
Featureline to hold business requirements and the Rule/Scenario to distinguish to test case, they could instead do:Additional Context
No response
Priority Level
Medium