Skip to content

Commit 02784e1

Browse files
committed
add test
1 parent 570c516 commit 02784e1

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/glide/browser/base/content/test/commandline/browser_commandline.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,3 +725,25 @@ add_task(async function test_commandline_close() {
725725
is(result, true, "close() should return true when the commandline was open");
726726
await wait_for_mode("normal");
727727
});
728+
729+
add_task(async function test_update_commandline() {
730+
await reload_config(function _() {});
731+
732+
await BrowserTestUtils.withNewTab(FILE, async () => {
733+
await GlideTestUtils.commandline.open();
734+
await new Promise(r => requestAnimationFrame(r));
735+
736+
await keys("update");
737+
738+
is(
739+
GlideTestUtils.commandline.current_source_header(),
740+
"update",
741+
"entering `update` should result in update completions",
742+
);
743+
let visible_rows = GlideTestUtils.commandline.visible_rows();
744+
// Note: Updates are disabled in the test environment
745+
// There will be 1 visible row stating that "Updates are disabled by policy 1"
746+
await waiter(() => visible_rows.length).is(1, "there should only be 1 update option present");
747+
await keys("<esc>");
748+
});
749+
});

0 commit comments

Comments
 (0)