import { expect, fixture, html } from '@open-wc/testing';
import './nile-link';
describe('NileLink', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.tagName.toLowerCase()).to.equal('nile-link'); });
    it('4. disabled defaults false', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.disabled).to.be.false; });
    it('5. button defaults false', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.button).to.be.false; });
    it('6. anchor element', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('a')).to.exist; });
    it('7. base part', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('[part="base"]')).to.exist; });
    it('8. link class', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link')).to.exist; });
    it('9. disabled class', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; });
    it('10. button class', async () => { const el = await fixture(html `<nile-link .button=${true}></nile-link>`); expect(el.shadowRoot.querySelector('.link__button')).to.exist; });
    it('11. prefix slot', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('slot[name="prefix"]')).to.exist; });
    it('12. default slot', async () => { const el = await fixture(html `<nile-link></nile-link>`); const s = el.shadowRoot.querySelector('slot:not([name])'); expect(s).to.exist; });
    it('13. suffix slot', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('slot[name="suffix"]')).to.exist; });
    it('14. prefix part', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('[part="prefix"]')).to.exist; });
    it('15. label part', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('[part="label"]')).to.exist; });
    it('16. suffix part', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('[part="suffix"]')).to.exist; });
    it('17. href attr', async () => { const el = await fixture(html `<nile-link href="https://example.com"></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.href).to.contain('example.com'); });
    it('18. disabled reflected', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); expect(el.hasAttribute('disabled')).to.be.true; });
    it('19. aria-disabled true', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.getAttribute('aria-disabled')).to.equal('true'); });
    it('20. aria-disabled false', async () => { const el = await fixture(html `<nile-link></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.getAttribute('aria-disabled')).to.equal('false'); });
    it('21. tabindex 0 enabled', async () => { const el = await fixture(html `<nile-link></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.getAttribute('tabindex')).to.equal('0'); });
    it('22. tabindex -1 disabled', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.getAttribute('tabindex')).to.equal('-1'); });
    it('23. link__prefix class', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link__prefix')).to.exist; });
    it('24. link__label class', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link__label')).to.exist; });
    it('25. link__suffix class', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link__suffix')).to.exist; });
    it('26. slotted prefix', async () => { const el = await fixture(html `<nile-link><span slot="prefix">P</span></nile-link>`); expect(el.querySelector('[slot="prefix"]')).to.exist; });
    it('27. slotted suffix', async () => { const el = await fixture(html `<nile-link><span slot="suffix">S</span></nile-link>`); expect(el.querySelector('[slot="suffix"]')).to.exist; });
    it('28. slotted content', async () => { const el = await fixture(html `<nile-link>Click me</nile-link>`); expect(el.textContent).to.contain('Click me'); });
    it('29. dynamic disabled', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.disabled = true; await el.updateComplete; expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; });
    it('30. dynamic disabled off', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); el.disabled = false; await el.updateComplete; expect(el.shadowRoot.querySelector('.link--disabled')).to.be.null; });
    it('31. dynamic button', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.button = true; await el.updateComplete; expect(el.shadowRoot.querySelector('.link__button')).to.exist; });
    it('32. dynamic href', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.href = 'https://test.com'; await el.updateComplete; const a = el.shadowRoot.querySelector('a'); expect(a.href).to.contain('test.com'); });
    it('33. has styles', async () => { expect((await import('./nile-link')).NileLink.styles).to.exist; });
    it('34. is defined', async () => { expect(customElements.get('nile-link')).to.exist; });
    it('35. shadow mode', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('36. isConnected', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.isConnected).to.be.true; });
    it('37. removal', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('38. outerHTML', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.outerHTML).to.contain('nile-link'); });
    it('39. matches', async () => { const el = await fixture(html `<nile-link class="x"></nile-link>`); expect(el.matches('nile-link.x')).to.be.true; });
    it('40. closest', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.closest('nile-link')).to.equal(el); });
    it('41. cloneNode', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-link'); });
    it('42. getBoundingClientRect', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.getBoundingClientRect()).to.exist; });
    it('43. dispatchEvent', async () => { const el = await fixture(html `<nile-link></nile-link>`); 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-link></nile-link>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('45. requestUpdate', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('46. render method', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.render).to.be.a('function'); });
    it('47. shadowRoot host', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.host).to.equal(el); });
    it('48. class attr', async () => { const el = await fixture(html `<nile-link class="l"></nile-link>`); expect(el.classList.contains('l')).to.be.true; });
    it('49. id attr', async () => { const el = await fixture(html `<nile-link id="l1"></nile-link>`); expect(el.id).to.equal('l1'); });
    it('50. style attr', async () => { const el = await fixture(html `<nile-link style="color:red"></nile-link>`); expect(el.style.color).to.equal('red'); });
    it('51. data attr', async () => { const el = await fixture(html `<nile-link data-x="1"></nile-link>`); expect(el.getAttribute('data-x')).to.equal('1'); });
    it('52. hidden', async () => { const el = await fixture(html `<nile-link hidden></nile-link>`); expect(el.hidden).to.be.true; });
    it('53. dir', async () => { const el = await fixture(html `<nile-link dir="rtl"></nile-link>`); expect(el.dir).to.equal('rtl'); });
    it('54. nodeType', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.nodeType).to.equal(1); });
    it('55. multiple instances', async () => { const c = await fixture(html `<div><nile-link></nile-link><nile-link></nile-link></div>`); expect(c.querySelectorAll('nile-link').length).to.equal(2); });
    it('56. parent-child', async () => { const c = await fixture(html `<div><nile-link></nile-link></div>`); expect(c.querySelector('nile-link').parentElement).to.equal(c); });
    it('57. localName', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.localName).to.equal('nile-link'); });
    it('58. namespaceURI', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('59. ownerDocument', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.ownerDocument).to.equal(document); });
    it('60. classList add', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('61. dataset', async () => { const el = await fixture(html `<nile-link data-idx="0"></nile-link>`); expect(el.dataset.idx).to.equal('0'); });
    it('62. hasAttribute disabled', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); expect(el.hasAttribute('disabled')).to.be.true; });
    it('63. removeAttribute disabled', async () => { const el = await fixture(html `<nile-link disabled></nile-link>`); el.removeAttribute('disabled'); await el.updateComplete; expect(el.disabled).to.be.false; });
    it('64. setAttribute disabled', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.setAttribute('disabled', ''); await el.updateComplete; expect(el.disabled).to.be.true; });
    it('65. no disabled class default', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link--disabled')).to.be.null; });
    it('66. no button class default', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelector('.link__button')).to.be.null; });
    it('67. disabled type', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(typeof el.disabled).to.equal('boolean'); });
    it('68. button type', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(typeof el.button).to.equal('boolean'); });
    it('69. handleClick method', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.handleClick).to.be.a('function'); });
    it('70. no forms', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelectorAll('form').length).to.equal(0); });
    it('71. no inputs', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelectorAll('input').length).to.equal(0); });
    it('72. no buttons', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.querySelectorAll('button').length).to.equal(0); });
    it('73. aria-label', async () => { const el = await fixture(html `<nile-link aria-label="Link"></nile-link>`); expect(el.getAttribute('aria-label')).to.equal('Link'); });
    it('74. slot count', async () => { const el = await fixture(html `<nile-link></nile-link>`); const slots = el.shadowRoot.querySelectorAll('slot'); expect(slots.length).to.equal(3); });
    it('75. createElement', async () => { const el = document.createElement('nile-link'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('76. children survived update', async () => { const el = await fixture(html `<nile-link><span id="s1">Link</span></nile-link>`); el.disabled = true; await el.updateComplete; expect(el.querySelector('#s1')).to.exist; });
    it('77. rapid toggles', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.disabled = true; await el.updateComplete; el.disabled = false; await el.updateComplete; el.disabled = true; await el.updateComplete; expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; });
    it('78. title attr', async () => { const el = await fixture(html `<nile-link title="T"></nile-link>`); expect(el.title).to.equal('T'); });
    it('79. lang attr', async () => { const el = await fixture(html `<nile-link lang="en"></nile-link>`); expect(el.lang).to.equal('en'); });
    it('80. anchor no href default', async () => { const el = await fixture(html `<nile-link></nile-link>`); const a = el.shadowRoot.querySelector('a'); expect(a.getAttribute('href')).to.be.null; });
    it('81. text children', async () => { const el = await fixture(html `<nile-link>Test</nile-link>`); expect(el.textContent).to.contain('Test'); });
    it('82. childElementCount', async () => { const el = await fixture(html `<nile-link><span>A</span></nile-link>`); expect(el.childElementCount).to.equal(1); });
    it('83. firstElementChild', async () => { const el = await fixture(html `<nile-link><span>A</span></nile-link>`); expect(el.firstElementChild.tagName.toLowerCase()).to.equal('span'); });
    it('84. shadow childNodes', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('85. no children default', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.childElementCount).to.equal(0); });
    it('86. innerHTML', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.innerHTML = '<span>New</span>'; expect(el.querySelector('span').textContent).to.equal('New'); });
    it('87. combined disabled button', async () => { const el = await fixture(html `<nile-link disabled .button=${true}></nile-link>`); expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; expect(el.shadowRoot.querySelector('.link__button')).to.exist; });
    it('88. nested elements', async () => { const el = await fixture(html `<nile-link><strong>Bold</strong> text</nile-link>`); expect(el.querySelector('strong')).to.exist; });
    it('89. slot prefix content', async () => { const el = await fixture(html `<nile-link><nile-icon slot="prefix" name="star"></nile-icon>Link</nile-link>`); expect(el.querySelector('[slot="prefix"]')).to.exist; });
    it('90. slot suffix content', async () => { const el = await fixture(html `<nile-link>Link<nile-icon slot="suffix" name="arrow"></nile-icon></nile-link>`); expect(el.querySelector('[slot="suffix"]')).to.exist; });
    it('91. aria attributes', async () => { const el = await fixture(html `<nile-link aria-describedby="desc" aria-haspopup="true"></nile-link>`); expect(el.getAttribute('aria-describedby')).to.equal('desc'); expect(el.getAttribute('aria-haspopup')).to.equal('true'); });
    it('92. dynamic all', async () => { const el = await fixture(html `<nile-link></nile-link>`); el.disabled = true; el.button = true; el.href = '#'; await el.updateComplete; expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; expect(el.shadowRoot.querySelector('.link__button')).to.exist; });
    it('93. re-renders', async () => { const el = await fixture(html `<nile-link></nile-link>`); for (let i = 0; i < 3; i++) {
        el.disabled = !el.disabled;
        await el.updateComplete;
    } expect(el.shadowRoot).to.not.be.null; });
    it('94. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-link></nile-link>`); let detail; el.addEventListener('test', ((e) => { detail = e.detail; })); el.dispatchEvent(new CustomEvent('test', { detail: 'x' })); expect(detail).to.equal('x'); });
    it('95. scrollIntoView', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('96. focus method', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.focus).to.be.a('function'); });
    it('97. blur method', async () => { const el = await fixture(html `<nile-link></nile-link>`); expect(el.blur).to.be.a('function'); });
    it('98. tabindex attr', async () => { const el = await fixture(html `<nile-link tabindex="0"></nile-link>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('99. role attr', async () => { const el = await fixture(html `<nile-link role="link"></nile-link>`); expect(el.getAttribute('role')).to.equal('link'); });
    it('100. full integration', async () => { const el = await fixture(html `<nile-link href="https://example.com" disabled class="l" id="l1"><span slot="prefix">P</span>Click<span slot="suffix">S</span></nile-link>`); expect(el.disabled).to.be.true; expect(el.href).to.equal('https://example.com'); expect(el.id).to.equal('l1'); expect(el.querySelector('[slot="prefix"]')).to.exist; expect(el.querySelector('[slot="suffix"]')).to.exist; expect(el.shadowRoot.querySelector('.link--disabled')).to.exist; });
});
//# sourceMappingURL=nile-link.test.js.map