Open mkeereman-sfdc opened 3 weeks ago
The customLayout config property is not respected when running the CLI command and sending the message through a webhook
customLayout
See https://github.com/ryanrosello-og/playwright-slack-report/blob/main/cli.ts#L74C7-L80C10
const webhookResult = await slackWebhookClient.sendMessage({ customLayout: undefined, customLayoutAsync: undefined, maxNumberOfFailures: config.maxNumberOfFailures, disableUnfurl: config.disableUnfurl, summaryResults, });
{ "sendResults": "always", "slackLogLevel": "error", "sendUsingWebhook": { "webhookUrl": "XXX }, "meta": [ { "key": "project", "value": "test" }, { "key": "build", "value": "1.0.0" }, { "key": "branch", "value": "main" }, { "key": "commit", "value": "1234567890" } ], "maxNumberOfFailures": 4, "disableUnfurl": true, "customLayout": { "source": "./playwright/slack/template.ts", "functionName": "generateMessage" } }
Custom layout is respected in CLI for webhooks as well
1.1.86
This should be addressed in https://github.com/ryanrosello-og/playwright-slack-report/pull/179
Bug description
The
customLayout
config property is not respected when running the CLI command and sending the message through a webhookSee https://github.com/ryanrosello-og/playwright-slack-report/blob/main/cli.ts#L74C7-L80C10
How to reproduce (please include a snippet of your Playwright Slack Reporter configuration)
{ "sendResults": "always", "slackLogLevel": "error", "sendUsingWebhook": { "webhookUrl": "XXX }, "meta": [ { "key": "project", "value": "test" }, { "key": "build", "value": "1.0.0" }, { "key": "branch", "value": "main" }, { "key": "commit", "value": "1234567890" } ], "maxNumberOfFailures": 4, "disableUnfurl": true, "customLayout": { "source": "./playwright/slack/template.ts", "functionName": "generateMessage" } }
Expected behavior
Custom layout is respected in CLI for webhooks as well
Environment & setup
playwright-slack-report version