[IMP] mail: add empty message (@ and #)

closes odoo/odoo#74933

Task-id: 2622240
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
Francois (fge)
2021-08-26 13:56:14 +00:00
parent dca9ca6464
commit 4500a72c1c
3 changed files with 11 additions and 12 deletions
@@ -2,6 +2,7 @@
import { afterEach, afterNextRender, beforeEach, start } from '@mail/utils/test_utils';
import { click, nextTick, patchWithCleanup, triggerHotkey } from "@web/../tests/helpers/utils";
import { editSearchBar } from '@web/../tests/webclient/commands/command_service_tests';
import { browser } from '@web/core/browser/browser';
import { registry } from "@web/core/registry";
import { commandService } from "@web/webclient/commands/command_service";
@@ -49,10 +50,7 @@ QUnit.module('mail', {}, function () {
await nextTick();
// Switch to partners
const search = webClient.el.querySelector(".o_command_palette_search input");
search.value = "@";
search.dispatchEvent(new InputEvent("input"));
await nextTick();
await editSearchBar("@");
assert.deepEqual(
[...webClient.el.querySelectorAll(".o_command_palette .o_command")].map((el) => el.textContent),
[
@@ -91,10 +89,7 @@ QUnit.module('mail', {}, function () {
await nextTick();
// Switch to channels
const search = webClient.el.querySelector(".o_command_palette_search input");
search.value = "#";
search.dispatchEvent(new InputEvent("input"));
await nextTick();
await editSearchBar("#");
assert.deepEqual(
[...webClient.el.querySelectorAll(".o_command_palette .o_command")].map((el) => el.textContent),
[