mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): Fix flaky unit test in editor UI (no-changelog) (#17787)
This commit is contained in:
@@ -1054,7 +1054,10 @@ describe('useRunWorkflow({ router })', () => {
|
||||
// Assert that markExecutionAsStopped() isn't called yet after a simulated delay
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
expect(markStoppedSpy).not.toHaveBeenCalled();
|
||||
expect(getExecutionSpy).toHaveBeenCalledWith('test-exec-id');
|
||||
await waitFor(() => expect(getExecutionSpy).toHaveBeenCalledWith('test-exec-id'));
|
||||
|
||||
getExecutionSpy.mockReset();
|
||||
expect(getExecutionSpy).toHaveBeenCalledTimes(0);
|
||||
|
||||
// Simulated executionFinished event
|
||||
getExecutionSpy.mockResolvedValue({
|
||||
|
||||
Reference in New Issue
Block a user