Files
zulip/frontend_tests/node_tests/lib/compose_banner.js
evykassirer e9045dcd58 compose: Rename compose_error to compose_banner.
It no longer handles only error messages, but banners of multiple
types.
2022-12-06 15:43:49 -08:00

13 lines
476 B
JavaScript

"use strict";
const compose_banner = require("../../../static/js/compose_banner");
const $ = require("../../zjsunit/zjquery");
exports.mock_banners = () => {
// zjquery doesn't support `remove`, which is used when clearing the compose box.
// TODO: improve how we test this so that we don't have to mock things like this.
for (const classname of Object.values(compose_banner.CLASSNAMES)) {
$(`#compose_banners .${classname}`).remove = () => {};
}
};