-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
π€ What's the problem you're trying to solve?
I need to use custom strategy for testcase naming, actually adding a Playwright project name (see microsoft/playwright#23432).
Currently, naming strategy is hardcoded.
β¨ What's your proposed solution?
Something like:
formatter({
options,
on,
write,
+ namingStrategy = NAMING_STRATEGY
}: {
options: { suiteName?: string }
on: (type: 'message', handler: (message: Envelope) => void) => void
write: (content: string) => void
+ namingStrategy: NamingStrategy
}) {
const query = new Query()
const builder = xmlbuilder
.create('testsuite', { invalidCharReplacement: '' })
.att('name', options.suiteName || 'Cucumber')
on('message', (message) => {
query.update(message)
if (message.testRunFinished) {
- const testSuite = makeReport(query)
+ const testSuite = makeReport(query, { namingStrategy })
Ideally, it would be great to be able to pass arbitrary function, e.g. (lineage: Lineage) => string
.
β Have you considered any alternatives or workarounds?
No response
π Any additional context?
No response
Metadata
Metadata
Assignees
Labels
No labels