MCPcopy Create free account
hub / github.com/bugy/script-server / assertVisibleItems

Function assertVisibleItems

web-src/tests/unit/combobox_test.js:388–403  ·  view source on GitHub ↗
(combobox, expectedVisible)

Source from the content-addressed store, hash-verified

386 }
387
388 function assertVisibleItems(combobox, expectedVisible) {
389 const [header, ...listItems] = combobox.findAll('li').wrappers;
390
391 expect(header.classes()).not.toContain('search-hidden');
392
393 for (const listItem of listItems) {
394 const text = listItem.text();
395
396 const shouldBeVisible = contains(expectedVisible, text);
397 if (shouldBeVisible) {
398 expect(listItem.classes()).not.toContain('search-hidden');
399 } else {
400 expect(listItem.classes()).toContain('search-hidden');
401 }
402 }
403 }
404
405 it('Test show search field', async function () {
406 const values = await makeSearchable();

Callers 1

combobox_test.jsFile · 0.85

Calls 1

containsFunction · 0.90

Tested by

no test coverage detected