Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Jan 19, 2024
1 parent 61c83d9 commit 208868b
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions test/spec/features/popup-menu/PopupMenuSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createEvent as globalEvent } from '../../../util/MockEvents';
import popupMenuModule from 'lib/features/popup-menu';
import modelingModule from 'lib/features/modeling';

import { html } from 'lib/ui';
// import { html } from 'lib/ui';


describe('features/popup-menu', function() {
Expand Down Expand Up @@ -1316,35 +1316,35 @@ describe('features/popup-menu', function() {
}));


it('should render custom entry if no search results', inject(async function(popupMenu) {
// it('should render custom entry if no search results', inject(async function(popupMenu) {

// given
popupMenu.registerProvider('test-menu', {
...testMenuProvider,
getNoSearchResultsCallback: () => {
return value => html`<h1 id="custom">${ value }</h1>`;
}
});
// // given
// popupMenu.registerProvider('test-menu', {
// ...testMenuProvider,
// getNoSearchResultsCallback: () => {
// return value => html`<h1 id="custom">${ value }</h1>`;
// }
// });

popupMenu.open({}, 'test-menu', { x: 100, y: 100 }, { search: true });
// popupMenu.open({}, 'test-menu', { x: 100, y: 100 }, { search: true });

// when
await triggerSearch('foobar');
// // when
// await triggerSearch('foobar');

// then
var shownEntries = queryPopupAll('.entry');
// // then
// var shownEntries = queryPopupAll('.entry');

expect(shownEntries).to.have.length(0);
// expect(shownEntries).to.have.length(0);

var noSearchResultsNode = queryPopup('.djs-popup-no-results');
// var noSearchResultsNode = queryPopup('.djs-popup-no-results');

expect(noSearchResultsNode).to.exist;
// expect(noSearchResultsNode).to.exist;

var customNode = domQuery('#custom', noSearchResultsNode);
// var customNode = domQuery('#custom', noSearchResultsNode);

expect(customNode).to.exist;
expect(customNode.textContent).to.eql('foobar');
}));
// expect(customNode).to.exist;
// expect(customNode.textContent).to.eql('foobar');
// }));

});

Expand Down

0 comments on commit 208868b

Please sign in to comment.