test: Added double click to open tab test, b=(no-bug), c=tabs, workspaces, tests

This commit is contained in:
Mr. M
2025-05-20 17:18:09 +02:00
parent adfc235865
commit bb78fc165b
3 changed files with 17 additions and 2 deletions

View File

@@ -5,3 +5,4 @@ support-files = [
["browser_basic_workspaces.js"]
["browser_workspace_bookmarks.js"]
["browser_double_click_newtab.js"]

View File

@@ -0,0 +1,14 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
'use strict';
add_task(async function test_Check_Creation() {
const placeToDoubleClick = gZenWorkspaces.activeWorkspaceStrip;
EventUtils.sendMouseEvent({ type: 'dblclick' }, placeToDoubleClick, window);
await TestUtils.waitForCondition(() => gBrowser.tabs.length === 3, 'New tab should be opened.');
ok(true, 'New tab should be opened.');
await BrowserTestUtils.removeTab(gBrowser.tabs[2]);
ok(gBrowser.tabs.length === 2, 'There should be one tab.');
});