mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
MAESTRO: Update tests to expect sshRemoteId parameter in assertions
Test fixes for SSH context propagation: - AutoRun.test.tsx: Add undefined sshRemoteId to writeDoc assertions - AutoRunBlurSaveTiming.test.tsx: Add undefined sshRemoteId to writeDoc assertions - AutoRunContentSync.test.tsx: Add undefined sshRemoteId to writeDoc assertions - AutoRunSessionIsolation.test.tsx: Add undefined sshRemoteId to writeDoc assertions - useBatchProcessor.test.ts: Add undefined sshRemoteId to worktreeSetup/worktreeCheckout assertions All tests now correctly expect the optional sshRemoteId parameter that was added for SSH remote session support. For local sessions, this parameter is undefined.
This commit is contained in:
@@ -360,7 +360,8 @@ describe('AutoRun', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/test/folder',
|
||||
'test-doc.md',
|
||||
'Updated content'
|
||||
'Updated content',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -663,7 +664,8 @@ describe('AutoRun', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/test/folder',
|
||||
'test-doc.md',
|
||||
'new content'
|
||||
'new content',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
expect(onOpenBatchRunner).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -216,7 +216,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/projects/alpha/docs',
|
||||
'Phase-1.md',
|
||||
'Modified content for alpha'
|
||||
'Modified content for alpha',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -240,7 +241,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/projects/beta/auto-run',
|
||||
'Tasks.md',
|
||||
'Updated tasks list'
|
||||
'Updated tasks list',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -263,7 +265,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/home/user/gamma-project/docs',
|
||||
'README.md',
|
||||
'Updated readme content'
|
||||
'Updated readme content',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -286,7 +289,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenLastCalledWith(
|
||||
'/delta/path',
|
||||
'doc1.md',
|
||||
'Version 2'
|
||||
'Version 2',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
|
||||
// Simulate saved content update (file watcher triggers contentVersion change)
|
||||
@@ -299,7 +303,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenLastCalledWith(
|
||||
'/delta/path',
|
||||
'doc1.md',
|
||||
'Version 3'
|
||||
'Version 3',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledTimes(2);
|
||||
@@ -609,7 +614,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/rapid/test',
|
||||
'rapid-doc.md',
|
||||
'Final typed content'
|
||||
'Final typed content',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -630,7 +636,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/empty/test',
|
||||
'empty-doc.md',
|
||||
''
|
||||
'',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -651,7 +658,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/whitespace/test',
|
||||
'ws-doc.md',
|
||||
' \n\n '
|
||||
' \n\n ',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -673,7 +681,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/special/test',
|
||||
'special-doc.md',
|
||||
specialContent
|
||||
specialContent,
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -696,7 +705,8 @@ describe('AutoRun Save Path Correctness', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/long/test',
|
||||
'long-doc.md',
|
||||
longContent
|
||||
longContent,
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -506,7 +506,8 @@ describe('AutoRun Content Synchronization Race Conditions', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/test/path',
|
||||
'my-doc.md',
|
||||
'New content to save'
|
||||
'New content to save',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -411,7 +411,8 @@ describe('AutoRun Session Isolation', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/session-a-folder',
|
||||
'my-doc.md',
|
||||
'New content'
|
||||
'New content',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
|
||||
// Should NOT be called with any other path
|
||||
@@ -605,7 +606,8 @@ describe('AutoRun Session Isolation', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/folder-a',
|
||||
'doc-a.md',
|
||||
'Modified'
|
||||
'Modified',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -667,7 +669,8 @@ describe('AutoRun Folder Path Isolation', () => {
|
||||
expect(mockMaestro.autorun.writeDoc).toHaveBeenCalledWith(
|
||||
'/unique/session/path',
|
||||
'unique-doc.md',
|
||||
'Changed'
|
||||
'Changed',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1057,7 +1057,8 @@ describe('useBatchProcessor hook', () => {
|
||||
expect(mockWorktreeSetup).toHaveBeenCalledWith(
|
||||
'/test/path',
|
||||
'/test/worktree',
|
||||
'feature/test'
|
||||
'feature/test',
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1138,7 +1139,8 @@ describe('useBatchProcessor hook', () => {
|
||||
expect(mockWorktreeCheckout).toHaveBeenCalledWith(
|
||||
'/test/worktree',
|
||||
'feature/test',
|
||||
true
|
||||
true,
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -2853,7 +2855,8 @@ describe('useBatchProcessor hook', () => {
|
||||
expect(mockWorktreeCheckout).toHaveBeenCalledWith(
|
||||
'/test/worktree',
|
||||
'feature-branch',
|
||||
true
|
||||
true,
|
||||
undefined // sshRemoteId (undefined for local sessions)
|
||||
);
|
||||
|
||||
// Should have spawned agent with worktree path
|
||||
|
||||
Reference in New Issue
Block a user