diff --git a/src/zen/tests/tabs/browser.toml b/src/zen/tests/tabs/browser.toml index 1b03625c5..3d86041c6 100644 --- a/src/zen/tests/tabs/browser.toml +++ b/src/zen/tests/tabs/browser.toml @@ -7,6 +7,7 @@ support-files = [ "head.js", ] +["browser_tabs_empty_checks.js"] ["browser_drag_drop_vertical.js"] tags = [ "drag-drop", diff --git a/src/zen/tests/tabs/browser_tabs_empty_checks.js b/src/zen/tests/tabs/browser_tabs_empty_checks.js new file mode 100644 index 000000000..dd63cbe4a --- /dev/null +++ b/src/zen/tests/tabs/browser_tabs_empty_checks.js @@ -0,0 +1,28 @@ +/* Any copyright is dedicated to the Public Domain. + https://creativecommons.org/publicdomain/zero/1.0/ */ + +'use strict'; + +add_task(async function test_Empty_Tab_Transparent() { + const emptyTab = gZenWorkspaces._emptyTab; + ok(emptyTab, 'Empty tab should exist'); + ok(emptyTab.parentElement, 'Empty tab should be in the DOM'); + ok(emptyTab.hasAttribute('zen-empty-tab'), 'Empty tab should have the zen-empty-tab attribute'); + ok( + emptyTab.linkedBrowser.hasAttribute('transparent'), + 'Empty tab should have the transparent attribute' + ); +}); + +add_task(async function test_Empty_Tab_Always_First() { + ok(gBrowser.tabs[0].hasAttribute('zen-empty-tab'), 'First tab should be the empty tab'); + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: 'http://example.com', + }, + async () => { + ok(gBrowser.tabs[0].hasAttribute('zen-empty-tab'), 'First tab should be the empty tab'); + } + ); +}); diff --git a/src/zen/tests/welcome/browser_welcome.js b/src/zen/tests/welcome/browser_welcome.js index 42ea965fd..a27df1111 100644 --- a/src/zen/tests/welcome/browser_welcome.js +++ b/src/zen/tests/welcome/browser_welcome.js @@ -168,7 +168,12 @@ add_task(async function test_Welcome_Steps() { } group.delete(); resolve(); - }, 5000); // Wait for the transition to complete + }, 3000); // Wait for the transition to complete }); + for (const tab of gBrowser.tabs) { + if (tab.pinned) { + gBrowser.removeTab(tab); + } + } ok(true, 'Welcome process completed successfully'); });