Skip to content

Commit 5508954

Browse files
committed
test: use provider entry identity across platforms
1 parent 1446955 commit 5508954

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎test/projects/graphPanel.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ test("real graph host coalesces file events, ignores lock-only events, defers hi
7272
receive({type:"action",action:"select",viewKey,id:"tests/test0.cpp"});
7373
receive({type:"action",action:"page",viewKey,next:true});await tick();
7474
assert.equal(messages.filter(message=>message.type==="graph").at(-1)?.selected,"@group/tests","paging clears a selection from the previous page");
75-
receive({type:"action",action:"focus",viewKey,id:"tests/test20.cpp"});await tick();
75+
const focusedEntry = messages.filter(message=>message.type==="snapshot").at(-1)?.groups.find((group: {id:string})=>group.id==="@group/tests").nodes[20];
76+
assert.ok(focusedEntry);
77+
receive({type:"action",action:"focus",viewKey,id:focusedEntry});await until(()=>messages.filter(message=>message.type==="graph").at(-1)?.focus===focusedEntry);
7678
assert.equal(messages.filter(message=>message.type==="graph").at(-1)?.group,undefined,"focusing one entry leaves the group pager");
7779
assert.equal(messages.filter(message=>message.type==="graph").at(-1)?.offset,0);
78-
receive({type:"action",action:"back",viewKey});await tick();
80+
receive({type:"action",action:"back",viewKey});await until(()=>messages.filter(message=>message.type==="graph").at(-1)?.group==="@group/tests");
7981
assert.equal(messages.filter(message=>message.type==="graph").at(-1)?.group,"@group/tests");
8082
assert.equal(messages.filter(message=>message.type==="graph").at(-1)?.offset,20,"Back restores the previous test page");
8183
for(let i=0;i<100;i++)fileEvents[0](uri(path.join(roots[0],"src/lib.cppm")));

0 commit comments

Comments
 (0)