playwright-slack-report-burak 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,10 @@ class SlackReporter {
85
85
  this.log('⏩ Slack reporter - no failures found');
86
86
  return;
87
87
  }
88
+ if (this.sendResults === 'branch') {
89
+ this.log('🛑 Branch mode: skipping Slack post (GCS upload completed)');
90
+ return;
91
+ }
88
92
  const agent = this.proxy ? new https_proxy_agent_1.HttpsProxyAgent(this.proxy) : undefined;
89
93
  if (this.slackWebHookUrl) {
90
94
  const webhook = new webhook_1.IncomingWebhook(this.slackWebHookUrl, { agent });
@@ -184,10 +188,10 @@ class SlackReporter {
184
188
  };
185
189
  }
186
190
  if (!this.sendResults
187
- || !['always', 'on-failure', 'off'].includes(this.sendResults)) {
191
+ || !['always', 'on-failure', 'off', 'branch'].includes(this.sendResults)) {
188
192
  return {
189
193
  okToProceed: false,
190
- message: "❌ \"sendResults\" is not valid. Expecting one of ['always', 'on-failure', 'off'].",
194
+ message: "❌ \"sendResults\" is not valid. Expecting one of ['always', 'on-failure', 'off', 'branch'].",
191
195
  };
192
196
  }
193
197
  if (!this.sendResults || this.slackChannels?.length === 0) {
package/package.json CHANGED
@@ -33,7 +33,7 @@
33
33
  "lint-fix": "npx eslint . --ext .ts --fix"
34
34
  },
35
35
  "name": "playwright-slack-report-burak",
36
- "version": "3.3.0",
36
+ "version": "3.4.0",
37
37
  "main": "index.js",
38
38
  "types": "dist/index.d.ts",
39
39
  "author": "Burak B. <burak.boluk@hotmail.com>",