mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-05 12:57:51 +00:00
test: Fixed welcome page tests and added empty tab checks, b=no-bug, c=tests, tabs, welcome
This commit is contained in:
@@ -7,6 +7,7 @@ support-files = [
|
||||
"head.js",
|
||||
]
|
||||
|
||||
["browser_tabs_empty_checks.js"]
|
||||
["browser_drag_drop_vertical.js"]
|
||||
tags = [
|
||||
"drag-drop",
|
||||
|
||||
28
src/zen/tests/tabs/browser_tabs_empty_checks.js
Normal file
28
src/zen/tests/tabs/browser_tabs_empty_checks.js
Normal file
@@ -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');
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user