Bug 1825393 - Add keyboard tests for the message thread context menu. r=freaktechnik

- Add tests for opening and closing the context menu with keyboard

Differential Revision: https://phabricator.services.mozilla.com/D180851

--HG--
extra : amend_source : 0d62ced979d48ec53a60f38bb61cb3fd19a83675
This commit is contained in:
Elizabeth Mitchell 2023-06-30 08:16:47 +02:00
Родитель 66079aa10d
Коммит e90393f33a
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -250,6 +250,27 @@ add_task(async function testSingleMessage() {
await shownPromise;
checkMenuitems(mailContext, "singleMessageTree");
mailContext.hidePopup();
// Open the menu through the keyboard.
shownPromise = BrowserTestUtils.waitForEvent(mailContext, "popupshown");
const row = threadTree.getRowAtIndex(0);
await row.focus();
EventUtils.synthesizeMouseAtCenter(
row,
{
type: "contextmenu",
button: 0,
},
about3Pane
);
await shownPromise;
Assert.ok(
BrowserTestUtils.is_visible(mailContext),
"Context menu is shown through keyboard action"
);
mailContext.hidePopup();
Assert.ok(BrowserTestUtils.is_hidden(mailContext), "Context menu is hidden");
});
/**