UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

74 lines (73 loc) 3.75 kB
/** * DevExtreme (cjs/__internal/scheduler/a11y_status/a11y_status_text.test.js) * Version: 25.1.4 * Build date: Tue Aug 05 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; var _globals = require("@jest/globals"); var _a11y_status_text = require("./a11y_status_text"); (0, _globals.describe)("getA11yStatusText", (() => { (0, _globals.it)("should return text custom view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Two Weeks", type: "week", intervalCount: 2, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 10, 17, 1), new Date(2021, 10, 27, 12), 20)).toEqual("Scheduler. Two Weeks view: from November 17, 2021 to November 27, 2021 with 20 appointments") })); (0, _globals.it)("should return text month view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Month", type: "month", intervalCount: 1, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 9, 27, 1), new Date(2021, 11, 3, 12), 20)).toEqual("Scheduler. Month view: from October 2021 to December 2021 with 20 appointments") })); (0, _globals.it)("should return text week view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Week", type: "week", intervalCount: 1, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 10, 21, 1), new Date(2021, 10, 27, 12), 20)).toEqual("Scheduler. Week view: from November 21, 2021 to November 27, 2021 with 20 appointments") })); (0, _globals.it)("should return text day view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Day", type: "day", intervalCount: 1, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 10, 24, 1), new Date(2021, 10, 24, 12), 20)).toEqual("Scheduler. Day view: November 24, 2021 with 20 appointments") })); (0, _globals.it)("should return text with indicator on the view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Day", type: "day", intervalCount: 1, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 10, 24, 1), new Date(2021, 10, 24, 12), 20, new Date(2021, 10, 24, 10))).toEqual("Scheduler. Day view: November 24, 2021 with 20 appointments. The current time indicator is visible in the view") })); (0, _globals.it)("should return text with indicator out of the view", (() => { (0, _globals.expect)((0, _a11y_status_text.getA11yStatusText)({ name: "Day", type: "day", intervalCount: 1, groupOrientation: "horizontal", maxAppointmentsPerCell: "auto", allDayPanelMode: "all" }, new Date(2021, 10, 24, 1), new Date(2021, 10, 24, 12), 20, new Date(2021, 10, 12, 10))).toEqual("Scheduler. Day view: November 24, 2021 with 20 appointments. The current time indicator is not visible on the screen") })) }));