@moroo/wdio-slack-reporter
Version:
Reporter from WebdriverIO using Incoming webhook and Web API to send results to Slack.
82 lines • 2.77 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var constants_exports = {};
__export(constants_exports, {
DEFAULT_COLOR: () => DEFAULT_COLOR,
DEFAULT_INDENT: () => DEFAULT_INDENT,
EMOJI_SYMBOLS: () => EMOJI_SYMBOLS,
ERROR_MESSAGES: () => ERROR_MESSAGES,
EVENTS: () => EVENTS,
FAILED_COLOR: () => FAILED_COLOR,
FINISHED_COLOR: () => FINISHED_COLOR,
SLACK_ICON_URL: () => SLACK_ICON_URL,
SLACK_NAME: () => SLACK_NAME,
SLACK_REQUEST_TYPE: () => SLACK_REQUEST_TYPE,
SUCCESS_COLOR: () => SUCCESS_COLOR
});
module.exports = __toCommonJS(constants_exports);
const SLACK_NAME = "WebdriverIO Reporter";
const SLACK_ICON_URL = "https://webdriver.io/img/webdriverio.png";
const SUCCESS_COLOR = "#36a64f";
const FAILED_COLOR = "#dc3545";
const DEFAULT_COLOR = "#D3D3D3";
const FINISHED_COLOR = "#4366c7";
const DEFAULT_INDENT = " ";
const EMOJI_SYMBOLS = {
PASSED: ":white_check_mark:",
SKIPPED: ":double_vertical_bar:",
PENDING: ":grey_question:",
FAILED: ":x:",
ROCKET: ":rocket:",
CHECKERED_FLAG: ":checkered_flag:",
STOPWATCH: ":stopwatch:"
};
const SLACK_REQUEST_TYPE = {
WEB_API_POST_MESSAGE: "web-api:message",
WEB_API_UPLOAD: "web-api:upload",
WEBHOOK_SEND: "webhook:send"
};
const EVENTS = {
POST_MESSAGE: "slackReporter:postMessage",
UPLOAD: "slackReporter:upload",
SEND: "slackReporter:send",
RESULT: "slackReporter:result",
SCREENSHOT: "slackReporter:screenshot"
};
const ERROR_MESSAGES = {
UNDEFINED_SLACK_OPTION: "Slack Option is undefined. Please Check Slack Option.",
NOT_USING_WEBHOOK: "Not using webhook.",
NOT_USING_WEB_API: "Not using web-api.",
DISABLED_OPTIONS: "Disabled notifyFailedCase or uploadScreenshotOfFailedCase options."
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DEFAULT_COLOR,
DEFAULT_INDENT,
EMOJI_SYMBOLS,
ERROR_MESSAGES,
EVENTS,
FAILED_COLOR,
FINISHED_COLOR,
SLACK_ICON_URL,
SLACK_NAME,
SLACK_REQUEST_TYPE,
SUCCESS_COLOR
});
//# sourceMappingURL=constants.cjs.map