playwright-msteams-reporter-conditional
Version:
Microsoft Teams reporter for Playwright which allows you to send notifications about the status of your E2E tests.
45 lines (44 loc) • 1.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTableRow = void 0;
const createTableRow = (type, total, options) => {
const row = {
type: "TableRow",
cells: [
{
type: "TableCell",
items: [
{
type: "TextBlock",
text: type,
wrap: true,
},
],
style: (options === null || options === void 0 ? void 0 : options.style) || undefined,
},
{
type: "TableCell",
items: [
{
type: "TextBlock",
text: `${total}`,
wrap: true,
},
],
},
],
};
if (options === null || options === void 0 ? void 0 : options.style) {
row.cells[0].style = options.style;
}
if (options === null || options === void 0 ? void 0 : options.isSubtle) {
row.cells[0].items[0].isSubtle = options === null || options === void 0 ? void 0 : options.isSubtle;
row.cells[1].items[0].isSubtle = options === null || options === void 0 ? void 0 : options.isSubtle;
}
if (options === null || options === void 0 ? void 0 : options.weight) {
row.cells[0].items[0].weight = options.weight;
row.cells[1].items[0].weight = options.weight;
}
return row;
};
exports.createTableRow = createTableRow;