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