mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-04 14:18:31 +00:00
test: Added tests for split view, p=#9667, c=tests
This commit is contained in:
24
src/zen/tests/workspaces/browser_change_to_empty.js
Normal file
24
src/zen/tests/workspaces/browser_change_to_empty.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
'use strict';
|
||||
|
||||
add_task(async function test_Change_To_Empty() {
|
||||
const currentWorkspaceUUID = gZenWorkspaces.activeWorkspace;
|
||||
await gZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
|
||||
const workspaces = await gZenWorkspaces._workspaces();
|
||||
const secondWorkspace = workspaces.workspaces[1];
|
||||
|
||||
await gZenWorkspaces.changeWorkspace(secondWorkspace.uuid);
|
||||
ok(gBrowser.selectedTab === gZenWorkspaces._emptyTab, 'The empty tab should be selected.');
|
||||
|
||||
await gZenWorkspaces.removeWorkspace(gZenWorkspaces.activeWorkspace);
|
||||
ok(
|
||||
gBrowser.selectedTab !== gZenWorkspaces._emptyTab,
|
||||
'The empty tab should not be selected anymore.'
|
||||
);
|
||||
|
||||
const workspacesAfterRemove = await gZenWorkspaces._workspaces();
|
||||
ok(workspacesAfterRemove.workspaces.length === 1, 'One workspace should exist.');
|
||||
ok(gBrowser.tabs.length === 2, 'There should be two tabs.');
|
||||
});
|
||||
Reference in New Issue
Block a user