Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jarekdanielak committed Oct 16, 2024
1 parent 07add7f commit b439ec6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/spec/features/popup-menu/PopupMenuSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@ describe('features/popup-menu', function() {

var y = documentBounds.height - 40;

var cursorPosition = { x: documentBounds.left + 100, y: documentBounds.top + y };
var cursorPosition = { x: documentBounds.left + 100, y };

// when
popupMenu.open({}, 'custom-provider', cursorPosition);
Expand All @@ -1996,8 +1996,7 @@ describe('features/popup-menu', function() {
// given
var documentBounds = document.documentElement.getBoundingClientRect();

const y = - 5;
var cursorPosition = { x: documentBounds.left + 100, y: documentBounds.top + y };
var cursorPosition = { x: documentBounds.left + 100, y: documentBounds.top - 5 };

// when
popupMenu.open({}, 'custom-provider', cursorPosition);
Expand All @@ -2010,7 +2009,7 @@ describe('features/popup-menu', function() {
};

// then
expect(menu.offsetTop).to.be.closeTo(y + menuDimensions.height, 3);
expect(menu.offsetTop).to.be.closeTo(documentBounds.top + menuDimensions.height, 3);
}));


Expand Down

0 comments on commit b439ec6

Please sign in to comment.