playwright-msteams-reporter-conditional
Version:
Microsoft Teams reporter for Playwright which allows you to send notifications about the status of your E2E tests.
36 lines (35 loc) • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
describe("getNotificationColor", () => {
it("Should return 'good' background", () => {
const statuses = {
passed: 1,
failed: 0,
flaky: 0,
skipped: 0,
};
const title = (0, _1.getNotificationColor)(statuses);
expect(title).toBe("Good");
});
it("Should return 'warning' background", () => {
const statuses = {
passed: 1,
failed: 0,
flaky: 1,
skipped: 0,
};
const title = (0, _1.getNotificationColor)(statuses);
expect(title).toBe("Warning");
});
it("Should return 'attention' background", () => {
const statuses = {
passed: 1,
failed: 1,
flaky: 1,
skipped: 0,
};
const title = (0, _1.getNotificationColor)(statuses);
expect(title).toBe("Attention");
});
});