import { expect, fixture, html } from '@open-wc/testing';
import './nile-list';
describe('NileList', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.tagName.toLowerCase()).to.equal('nile-list'); });
    it('4. default slot', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('slot')).to.exist; });
    it('5. slotted content', async () => { const el = await fixture(html `<nile-list><div>Item</div></nile-list>`); expect(el.textContent).to.contain('Item'); });
    it('6. handleListItemClick method', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.handleListItemClick).to.be.a('function'); });
    it('7. emits nile-list-click', async () => { const el = await fixture(html `<nile-list></nile-list>`); let detail; el.addEventListener('nile-list-click', ((e) => { detail = e.detail; })); el.dispatchEvent(new CustomEvent('nile-list-click', { detail: { value: 'Test' } })); expect(detail.value).to.equal('Test'); });
    it('8. has styles', async () => { expect((await import('./nile-list')).NileList.styles).to.exist; });
    it('9. is defined', async () => { expect(customElements.get('nile-list')).to.exist; });
    it('10. shadow mode', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('11. isConnected', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.isConnected).to.be.true; });
    it('12. removal', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('13. outerHTML', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.outerHTML).to.contain('nile-list'); });
    it('14. matches', async () => { const el = await fixture(html `<nile-list class="x"></nile-list>`); expect(el.matches('.x')).to.be.true; });
    it('15. closest', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.closest('nile-list')).to.equal(el); });
    it('16. cloneNode', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-list'); });
    it('17. dispatchEvent', async () => { const el = await fixture(html `<nile-list></nile-list>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
    it('18. updateComplete', async () => { const el = await fixture(html `<nile-list></nile-list>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('19. render method', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.render).to.be.a('function'); });
    it('20. shadowRoot host', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.host).to.equal(el); });
    it('21. class attr', async () => { const el = await fixture(html `<nile-list class="l"></nile-list>`); expect(el.classList.contains('l')).to.be.true; });
    it('22. id attr', async () => { const el = await fixture(html `<nile-list id="l1"></nile-list>`); expect(el.id).to.equal('l1'); });
    it('23. hidden', async () => { const el = await fixture(html `<nile-list hidden></nile-list>`); expect(el.hidden).to.be.true; });
    it('24. nodeType', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.nodeType).to.equal(1); });
    it('25. localName', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.localName).to.equal('nile-list'); });
    it('26. namespaceURI', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('27. ownerDocument', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.ownerDocument).to.equal(document); });
    it('28. multiple instances', async () => { const c = await fixture(html `<div><nile-list></nile-list><nile-list></nile-list></div>`); expect(c.querySelectorAll('nile-list').length).to.equal(2); });
    it('29. parent-child', async () => { const c = await fixture(html `<div><nile-list></nile-list></div>`); expect(c.querySelector('nile-list').parentElement).to.equal(c); });
    it('30. createElement', async () => { const el = document.createElement('nile-list'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('31. dataset', async () => { const el = await fixture(html `<nile-list data-idx="0"></nile-list>`); expect(el.dataset.idx).to.equal('0'); });
    it('32. classList add', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('33. getBoundingClientRect', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.getBoundingClientRect()).to.exist; });
    it('34. no form', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('form')).to.be.null; });
    it('35. no input', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('input')).to.be.null; });
    it('36. no button', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('button')).to.be.null; });
    it('37. no anchor', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
    it('38. no img', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
    it('39. no svg', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('svg')).to.be.null; });
    it('40. style attr', async () => { const el = await fixture(html `<nile-list style="color:red"></nile-list>`); expect(el.style.color).to.equal('red'); });
    it('41. data attr', async () => { const el = await fixture(html `<nile-list data-x="1"></nile-list>`); expect(el.getAttribute('data-x')).to.equal('1'); });
    it('42. aria-label', async () => { const el = await fixture(html `<nile-list aria-label="List"></nile-list>`); expect(el.getAttribute('aria-label')).to.equal('List'); });
    it('43. role', async () => { const el = await fixture(html `<nile-list role="list"></nile-list>`); expect(el.getAttribute('role')).to.equal('list'); });
    it('44. dir', async () => { const el = await fixture(html `<nile-list dir="rtl"></nile-list>`); expect(el.dir).to.equal('rtl'); });
    it('45. title attr', async () => { const el = await fixture(html `<nile-list title="L"></nile-list>`); expect(el.title).to.equal('L'); });
    it('46. lang attr', async () => { const el = await fixture(html `<nile-list lang="en"></nile-list>`); expect(el.lang).to.equal('en'); });
    it('47. tabindex', async () => { const el = await fixture(html `<nile-list tabindex="0"></nile-list>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('48. requestUpdate', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('49. shadow childNodes', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('50. scrollIntoView', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('51. focus method', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.focus).to.be.a('function'); });
    it('52. blur method', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.blur).to.be.a('function'); });
    it('53. class toggle', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.classList.toggle('a'); expect(el.classList.contains('a')).to.be.true; });
    it('54. toggle hidden', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.hidden = true; expect(el.hidden).to.be.true; });
    it('55. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-list></nile-list>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
    it('56. nested in div', async () => { const c = await fixture(html `<div><nile-list></nile-list></div>`); expect(c.querySelector('nile-list')).to.exist; });
    it('57. no table', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('table')).to.be.null; });
    it('58. no ul', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('ul')).to.be.null; });
    it('59. no canvas', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
    it('60. no video', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('video')).to.be.null; });
    it('61. no audio', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('audio')).to.be.null; });
    it('62. no nav', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('nav')).to.be.null; });
    it('63. no aside', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('aside')).to.be.null; });
    it('64. no textarea', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('textarea')).to.be.null; });
    it('65. no select', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('select')).to.be.null; });
    it('66. setAttribute data', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.setAttribute('data-test', '1'); expect(el.dataset.test).to.equal('1'); });
    it('67. removeAttribute hidden', async () => { const el = await fixture(html `<nile-list hidden></nile-list>`); el.removeAttribute('hidden'); expect(el.hidden).to.be.false; });
    it('68. setAttribute class', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.setAttribute('class', 'test'); expect(el.classList.contains('test')).to.be.true; });
    it('69. aria-describedby', async () => { const el = await fixture(html `<nile-list aria-describedby="d"></nile-list>`); expect(el.getAttribute('aria-describedby')).to.equal('d'); });
    it('70. multiple re-renders', async () => { const el = await fixture(html `<nile-list></nile-list>`); for (let i = 0; i < 3; i++) {
        el.requestUpdate();
        await el.updateComplete;
    } expect(el.shadowRoot).to.not.be.null; });
    it('71. contains', async () => { const el = await fixture(html `<nile-list><span id="s1">T</span></nile-list>`); expect(el.contains(el.querySelector('#s1'))).to.be.true; });
    it('72. childElementCount', async () => { const el = await fixture(html `<nile-list><div>A</div><div>B</div></nile-list>`); expect(el.childElementCount).to.equal(2); });
    it('73. firstElementChild', async () => { const el = await fixture(html `<nile-list><span>A</span></nile-list>`); expect(el.firstElementChild.tagName.toLowerCase()).to.equal('span'); });
    it('74. no h1', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('h1')).to.be.null; });
    it('75. no p', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('p')).to.be.null; });
    it('76. no hr', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('hr')).to.be.null; });
    it('77. no pre', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('pre')).to.be.null; });
    it('78. no code', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('code')).to.be.null; });
    it('79. no nile-icon', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('nile-icon')).to.be.null; });
    it('80. no nile-badge', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('nile-badge')).to.be.null; });
    it('81. innerHTML empty default', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.innerHTML.trim()).to.equal(''); });
    it('82. textContent empty default', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.textContent.trim()).to.equal(''); });
    it('83. innerHTML with content', async () => { const el = await fixture(html `<nile-list><span>X</span></nile-list>`); expect(el.innerHTML).to.contain('span'); });
    it('84. removeChild', async () => { const el = await fixture(html `<nile-list><span id="s1">X</span></nile-list>`); const s = el.querySelector('#s1'); el.removeChild(s); expect(el.querySelector('#s1')).to.be.null; });
    it('85. appendChild', async () => { const el = await fixture(html `<nile-list></nile-list>`); const s = document.createElement('span'); s.textContent = 'New'; el.appendChild(s); expect(el.querySelector('span')).to.exist; });
    it('86. replaceChildren', async () => { const el = await fixture(html `<nile-list><span>Old</span></nile-list>`); const p = document.createElement('p'); p.textContent = 'New'; el.replaceChildren(p); expect(el.querySelector('p')).to.exist; expect(el.querySelector('span')).to.be.null; });
    it('87. slot count 1', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelectorAll('slot').length).to.equal(1); });
    it('88. no div', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('div')).to.be.null; });
    it('89. no span', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('span')).to.be.null; });
    it('90. setAttribute id', async () => { const el = await fixture(html `<nile-list></nile-list>`); el.setAttribute('id', 'l2'); expect(el.id).to.equal('l2'); });
    it('91. removeAttribute id', async () => { const el = await fixture(html `<nile-list id="l1"></nile-list>`); el.removeAttribute('id'); expect(el.id).to.equal(''); });
    it('92. hasAttribute id', async () => { const el = await fixture(html `<nile-list id="l1"></nile-list>`); expect(el.hasAttribute('id')).to.be.true; });
    it('93. getAttribute id', async () => { const el = await fixture(html `<nile-list id="l1"></nile-list>`); expect(el.getAttribute('id')).to.equal('l1'); });
    it('94. removeAttribute class', async () => { const el = await fixture(html `<nile-list class="x"></nile-list>`); el.removeAttribute('class'); expect(el.classList.contains('x')).to.be.false; });
    it('95. children survived update', async () => { const el = await fixture(html `<nile-list><span id="s1">T</span></nile-list>`); el.requestUpdate(); await el.updateComplete; expect(el.querySelector('#s1')).to.exist; });
    it('96. no nile-divider', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('nile-divider')).to.be.null; });
    it('97. no nile-button', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('nile-button')).to.be.null; });
    it('98. no header slot', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('slot[name="header"]')).to.be.null; });
    it('99. no footer slot', async () => { const el = await fixture(html `<nile-list></nile-list>`); expect(el.shadowRoot.querySelector('slot[name="footer"]')).to.be.null; });
    it('100. full integration', async () => { const el = await fixture(html `<nile-list class="l" id="l1" role="list" aria-label="Navigation"><div>Item 1</div><div>Item 2</div></nile-list>`); expect(el.id).to.equal('l1'); expect(el.getAttribute('role')).to.equal('list'); expect(el.childElementCount).to.equal(2); expect(el.shadowRoot.querySelector('slot')).to.exist; });
});
//# sourceMappingURL=nile-list.test.js.map