aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorTianren Dong <tianrendong.dtr@gmail.com>2026-06-22 21:04:05 -0400
committerTianren Dong <tianrendong.dtr@gmail.com>2026-06-22 21:04:05 -0400
commit2c1a4b3cf42c149f52d491131680e062e1935f5f (patch)
tree9ab27497cd52c5a04db63ae1a7bdba07e4b78134 /test-suite
parentc1ed934dd20931b177e233ae0327a290a8001631 (diff)
0.15.40: keep automation targets in session group
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/unit/automation-target.test.mjs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test-suite/unit/automation-target.test.mjs b/test-suite/unit/automation-target.test.mjs
index 9c8618c..8a6ea2b 100644
--- a/test-suite/unit/automation-target.test.mjs
+++ b/test-suite/unit/automation-target.test.mjs
@@ -232,6 +232,14 @@ async function run() {
const blankTitle = await w.dispatch("tab.new", { url: "https://pi.test/blank-title", groupTitle: "", group: false, sessionKey: SK });
ok(typeof blankTitle.tab.groupId === "number" && blankTitle.tab.groupId >= 0, "tab.new-group: groupTitle:'' still creates a grouped tab");
ok(blankTitle.group.title === "Pi", "tab.new-group: blank groupTitle falls back to a group instead of opting out");
+
+ const nav2 = await w.dispatch("page.navigate", {
+ url: "https://pi.test/new-automation-target", waitUntilLoad: false,
+ sessionKey: "session:beta", joinSessionGroup: true, sessionGroupTitle: groupTitle,
+ });
+ ok(state.groups.size === groupsBefore + 1, "automation-target-group: reused the existing session group, only blank-title Pi group was extra");
+ ok(nav2.groupId === groupId, "automation-target-group: new automation target joined the existing session group");
+ ok(nav2.windowId === nav.windowId, "automation-target-group: new automation target was created in the existing group's window");
}
// ===== tab.new never leaves an ungrouped tab behind when grouping fails. =====