mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Fix flaky composable test (no-changelog) (#16927)
This commit is contained in:
committed by
GitHub
parent
31bd88fde9
commit
5c5c06aa58
@@ -487,8 +487,10 @@ describe('useCanvasOperations', () => {
|
||||
const { resolveNodePosition } = useCanvasOperations();
|
||||
const position = resolveNodePosition({ ...node, position: undefined }, nodeTypeDescription);
|
||||
|
||||
// No custom offset applied
|
||||
expect(position).toEqual([60, 320]);
|
||||
// No custom offset applied, allowing for some wiggle room when tests are run on different environments
|
||||
expect(position[0]).toBeGreaterThanOrEqual(40);
|
||||
expect(position[0]).toBeLessThanOrEqual(80);
|
||||
expect(position[1]).toBe(320);
|
||||
});
|
||||
|
||||
it('should handle missing connection type gracefully', () => {
|
||||
@@ -521,8 +523,10 @@ describe('useCanvasOperations', () => {
|
||||
const { resolveNodePosition } = useCanvasOperations();
|
||||
const position = resolveNodePosition({ ...node, position: undefined }, nodeTypeDescription);
|
||||
|
||||
// No custom offset applied
|
||||
expect(position).toEqual([60, 320]);
|
||||
// No custom offset applied, allowing for some wiggle room when tests are run on different environments
|
||||
expect(position[0]).toBeGreaterThanOrEqual(40);
|
||||
expect(position[0]).toBeLessThanOrEqual(80);
|
||||
expect(position[1]).toBe(320);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user