Skip to content

Commit

Permalink
test(popup-menu): verify documentation ref
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Nov 17, 2022
1 parent 3da3fb8 commit 929e089
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/spec/features/popup-menu/PopupMenuSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,39 @@ describe('features/popup-menu', function() {
expect(description.textContent).to.eql('This is a description');
}));


it('should add docRef if specified', inject(function(popupMenu) {

// given
var testMenuProvider = {
getEntries: function() {
return [
{
id: '1',
documentationRef: '#',
label: 'with documentation ref'
}
];
}
};

// when
popupMenu.registerProvider('test-menu', testMenuProvider);
popupMenu.open({}, 'test-menu', { x: 100, y: 100 });

// then
var link = queryPopup('.entry .docs a');

expect(link).to.exist;

// but when
link.click();

// then
// menu shall remain open
expect(popupMenu.isOpen()).to.be.true;
}));

});


Expand Down

0 comments on commit 929e089

Please sign in to comment.