fix: init send event at the right time

This commit is contained in:
sanish-bruno
2025-12-16 13:03:30 +05:30
parent de43ad00d8
commit 34fcc5bbfb
2 changed files with 10 additions and 8 deletions

View File

@@ -1412,6 +1412,14 @@ const registerNetworkIpc = (mainWindow) => {
folder = collection;
}
mainWindow.webContents.send('main:run-folder-event', {
type: 'testrun-started',
isRecursive: recursive,
collectionUid,
folderUid,
cancelTokenUid
});
// Create a map to store HookManagers for this collection/folder run
// Key format: 'collection:<collectionUid>', 'folder:<folderUid>', 'request:<requestUid>'
const hookManagersMap = new Map();
@@ -1463,14 +1471,6 @@ const registerNetworkIpc = (mainWindow) => {
await collectionHookManager.call(HOOK_EVENTS.RUNNER_BEFORE_COLLECTION_RUN, { collection, collectionUid });
}
mainWindow.webContents.send('main:run-folder-event', {
type: 'testrun-started',
isRecursive: recursive,
collectionUid,
folderUid,
cancelTokenUid
});
try {
let folderRequests = [];

View File

@@ -37,6 +37,8 @@ tests {
});
test("req.getTimeout/setTimeout - manages timeout", function() {
const before = bru.getVar('timeout-before');
expect(before).to.not.equal(10000);
expect(bru.getVar('timeout-after')).to.equal(10000);
});