test: Updated tests to the new names, b=(no-bug), c=tests, glance, workspaces, common

This commit is contained in:
Mr. M
2025-05-17 14:12:43 +02:00
parent 8e28e1a630
commit e712e8204d
8 changed files with 26 additions and 26 deletions

View File

@@ -6,9 +6,9 @@
add_setup(async function () {});
add_task(async function test_Check_Creation() {
const currentWorkspaceUUID = ZenWorkspaces.activeWorkspace;
await ZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
const workspaces = await ZenWorkspaces._workspaces();
const currentWorkspaceUUID = gZenWorkspaces.activeWorkspace;
await gZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
const workspaces = await gZenWorkspaces._workspaces();
ok(workspaces.workspaces.length === 2, 'Two workspaces should exist.');
ok(
currentWorkspaceUUID !== workspaces.workspaces[1].uuid,
@@ -22,8 +22,8 @@ add_task(async function test_Check_Creation() {
ok(gBrowser.tabs.length === 2, 'There should be two tabs.');
BrowserTestUtils.removeTab(newTab);
await ZenWorkspaces.removeWorkspace(ZenWorkspaces.activeWorkspace);
const workspacesAfterRemove = await ZenWorkspaces._workspaces();
await gZenWorkspaces.removeWorkspace(gZenWorkspaces.activeWorkspace);
const workspacesAfterRemove = await gZenWorkspaces._workspaces();
ok(workspacesAfterRemove.workspaces.length === 1, 'One workspace should exist.');
ok(
workspacesAfterRemove.workspaces[0].uuid === currentWorkspaceUUID,

View File

@@ -102,8 +102,8 @@ add_task(async function test_workspace_bookmark() {
return;
await withBookmarksShowing(async () => {
await ZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
const workspaces = await ZenWorkspaces._workspaces();
await gZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
const workspaces = await gZenWorkspaces._workspaces();
ok(workspaces.workspaces.length === 2, 'Two workspaces should exist.');
const firstWorkspace = workspaces.workspaces[0];
const secondWorkspace = workspaces.workspaces[1];
@@ -130,13 +130,13 @@ add_task(async function test_workspace_bookmark() {
await changeWorkspaceForBookmark(bookmark2, secondWorkspace);
await ZenWorkspaces.changeWorkspace(secondWorkspace);
await gZenWorkspaces.changeWorkspace(secondWorkspace);
const toolbarNode1 = getToolbarNodeForItemGuid(bookmark1.guid);
const toolbarNode2 = getToolbarNodeForItemGuid(bookmark2.guid);
ok(toolbarNode1, 'Bookmark1 should be in the toolbar');
ok(!toolbarNode2, 'Bookmark2 should be in the toolbar');
await ZenWorkspaces.changeWorkspace(firstWorkspace);
await gZenWorkspaces.changeWorkspace(firstWorkspace);
const toolbarNode3 = getToolbarNodeForItemGuid(bookmark1.guid);
const toolbarNode4 = getToolbarNodeForItemGuid(bookmark2.guid);
@@ -146,6 +146,6 @@ add_task(async function test_workspace_bookmark() {
await PlacesUtils.bookmarks.remove(bookmark1);
await PlacesUtils.bookmarks.remove(bookmark2);
await ZenWorkspaces.removeWorkspace(secondWorkspace.uuid);
await gZenWorkspaces.removeWorkspace(secondWorkspace.uuid);
});
});