test: Enable workspaces when doing tests, b=(no-bug), c=tests, workspaces

This commit is contained in:
Mr. M
2025-04-29 18:27:00 +02:00
parent 4f49ff3290
commit 79e731e89c
4 changed files with 15 additions and 10 deletions

View File

@@ -1,2 +1,2 @@
["browser_zen_workspaces.js"]
["workspaces/browser_basic_workspaces.js"]

View File

@@ -1,8 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
'use strict';
add_task(async function test_TODO() {
ok(true, 'TODO: implement the test');
});

View File

@@ -0,0 +1,13 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
'use strict';
add_setup(async function () {
await ZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
});
add_task(async function test_Check_Creation() {
const workspaces = await ZenWorkspaces._workspaces();
ok(workspaces.workspaces.length, 2);
});

View File

@@ -678,7 +678,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
get workspaceEnabled() {
if (typeof this._workspaceEnabled === 'undefined') {
this._workspaceEnabled = !gZenUIManager.testingEnabled && this.shouldHaveWorkspaces;
this._workspaceEnabled = this.shouldHaveWorkspaces;
}
return this._workspaceEnabled && !window.closed;
}