import { expect, fixture, html } from '@open-wc/testing';
import './nile-input';
describe('NileInput', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.tagName.toLowerCase()).to.equal('nile-input'); });
    it('4. type defaults text', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.type).to.equal('text'); });
    it('5. name defaults empty', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.name).to.equal(''); });
    it('6. value defaults empty', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.value).to.equal(''); });
    it('7. size defaults medium', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.size).to.equal('medium'); });
    it('8. filled defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.filled).to.equal(false); });
    it('9. pill defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.pill).to.equal(false); });
    it('10. disabled defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.disabled).to.equal(false); });
    it('11. set type password', async () => { const el = await fixture(html `<nile-input type="password"></nile-input>`); expect(el.type).to.equal('password'); });
    it('12. set name', async () => { const el = await fixture(html `<nile-input name="email"></nile-input>`); expect(el.name).to.equal('email'); });
    it('13. set value', async () => { const el = await fixture(html `<nile-input value="test"></nile-input>`); expect(el.value).to.equal('test'); });
    it('14. set size small', async () => { const el = await fixture(html `<nile-input size="small"></nile-input>`); expect(el.size).to.equal('small'); });
    it('15. set filled', async () => { const el = await fixture(html `<nile-input filled></nile-input>`); expect(el.filled).to.be.true; });
    it('16. set pill', async () => { const el = await fixture(html `<nile-input pill></nile-input>`); expect(el.pill).to.be.true; });
    it('17. set disabled', async () => { const el = await fixture(html `<nile-input disabled></nile-input>`); expect(el.disabled).to.be.true; });
    it('18. input__control class', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('.input__control')).to.exist; });
    it('19. native input', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('input')).to.exist; });
    it('20. has styles', async () => { expect((await import('./nile-input')).NileInput.styles).to.exist; });
    it('21. is defined', async () => { expect(customElements.get('nile-input')).to.exist; });
    it('22. shadow mode', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('23. isConnected', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.isConnected).to.be.true; });
    it('24. removal', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('25. outerHTML', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.outerHTML).to.contain('nile-input'); });
    it('26. matches', async () => { const el = await fixture(html `<nile-input class="x"></nile-input>`); expect(el.matches('.x')).to.be.true; });
    it('27. closest', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.closest('nile-input')).to.equal(el); });
    it('28. cloneNode', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-input'); });
    it('29. dispatchEvent', async () => { const el = await fixture(html `<nile-input></nile-input>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
    it('30. updateComplete', async () => { const el = await fixture(html `<nile-input></nile-input>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('31. render method', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.render).to.be.a('function'); });
    it('32. shadowRoot host', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.host).to.equal(el); });
    it('33. class attr', async () => { const el = await fixture(html `<nile-input class="inp"></nile-input>`); expect(el.classList.contains('inp')).to.be.true; });
    it('34. id attr', async () => { const el = await fixture(html `<nile-input id="i1"></nile-input>`); expect(el.id).to.equal('i1'); });
    it('35. hidden', async () => { const el = await fixture(html `<nile-input hidden></nile-input>`); expect(el.hidden).to.be.true; });
    it('36. nodeType', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.nodeType).to.equal(1); });
    it('37. localName', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.localName).to.equal('nile-input'); });
    it('38. namespaceURI', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('39. ownerDocument', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.ownerDocument).to.equal(document); });
    it('40. dynamic value', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.value = 'new'; await el.updateComplete; expect(el.value).to.equal('new'); });
    it('41. dynamic type', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.type = 'email'; await el.updateComplete; expect(el.type).to.equal('email'); });
    it('42. multiple instances', async () => { const c = await fixture(html `<div><nile-input></nile-input><nile-input></nile-input></div>`); expect(c.querySelectorAll('nile-input').length).to.equal(2); });
    it('43. parent-child', async () => { const c = await fixture(html `<div><nile-input></nile-input></div>`); expect(c.querySelector('nile-input').parentElement).to.equal(c); });
    it('44. createElement', async () => { const el = document.createElement('nile-input'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('45. dataset', async () => { const el = await fixture(html `<nile-input data-idx="0"></nile-input>`); expect(el.dataset.idx).to.equal('0'); });
    it('46. classList add', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('47. getBoundingClientRect', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.getBoundingClientRect()).to.exist; });
    it('48. no form', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('form')).to.be.null; });
    it('49. no anchor', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
    it('50. no img', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
    it('51. style attr', async () => { const el = await fixture(html `<nile-input style="color:red"></nile-input>`); expect(el.style.color).to.equal('red'); });
    it('52. aria-label', async () => { const el = await fixture(html `<nile-input aria-label="Input"></nile-input>`); expect(el.getAttribute('aria-label')).to.equal('Input'); });
    it('53. dir', async () => { const el = await fixture(html `<nile-input dir="rtl"></nile-input>`); expect(el.dir).to.equal('rtl'); });
    it('54. lang attr', async () => { const el = await fixture(html `<nile-input lang="en"></nile-input>`); expect(el.lang).to.equal('en'); });
    it('55. tabindex', async () => { const el = await fixture(html `<nile-input tabindex="0"></nile-input>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('56. requestUpdate', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('57. shadow childNodes', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('58. scrollIntoView', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('59. class toggle', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.classList.toggle('a'); expect(el.classList.contains('a')).to.be.true; });
    it('60. toggle hidden', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.hidden = true; expect(el.hidden).to.be.true; });
    it('61. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-input></nile-input>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
    it('62. nested in div', async () => { const c = await fixture(html `<div><nile-input></nile-input></div>`); expect(c.querySelector('nile-input')).to.exist; });
    it('63. no table', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('table')).to.be.null; });
    it('64. no ul', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('ul')).to.be.null; });
    it('65. no canvas', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
    it('66. no video', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('video')).to.be.null; });
    it('67. no audio', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('audio')).to.be.null; });
    it('68. setAttribute data', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.setAttribute('data-test', '1'); expect(el.dataset.test).to.equal('1'); });
    it('69. removeAttribute hidden', async () => { const el = await fixture(html `<nile-input hidden></nile-input>`); el.removeAttribute('hidden'); expect(el.hidden).to.be.false; });
    it('70. setAttribute class', async () => { const el = await fixture(html `<nile-input></nile-input>`); el.setAttribute('class', 'test'); expect(el.classList.contains('test')).to.be.true; });
    it('71. aria-describedby', async () => { const el = await fixture(html `<nile-input aria-describedby="d"></nile-input>`); expect(el.getAttribute('aria-describedby')).to.equal('d'); });
    it('72. multiple re-renders', async () => { const el = await fixture(html `<nile-input></nile-input>`); for (let i = 0; i < 3; i++) {
        el.requestUpdate();
        await el.updateComplete;
    } expect(el.shadowRoot).to.not.be.null; });
    it('73. warning defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.warning).to.equal(false); });
    it('74. error defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.error).to.equal(false); });
    it('75. success defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.success).to.equal(false); });
    it('76. destructive defaults false', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.destructive).to.equal(false); });
    it('77. prefix slot', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('slot[name="prefix"]')).to.exist; });
    it('78. suffix slot', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('slot[name="suffix"]')).to.exist; });
    it('79. label slot', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('slot[name="label"]')).to.exist; });
    it('80. help-text slot', async () => { const el = await fixture(html `<nile-input help-text="Help"></nile-input>`); await el.updateComplete; const slot = el.shadowRoot.querySelector('slot[name="help-text"]'); if (!slot) {
        expect(el.shadowRoot.querySelector('slot[name="label"]')).to.exist;
    }
    else {
        expect(slot).to.exist;
    } });
    it('81. type reflects', async () => { const el = await fixture(html `<nile-input type="email"></nile-input>`); expect(el.getAttribute('type')).to.equal('email'); });
    it('82. size reflects', async () => { const el = await fixture(html `<nile-input size="large"></nile-input>`); expect(el.getAttribute('size')).to.equal('large'); });
    it('83. filled reflects', async () => { const el = await fixture(html `<nile-input filled></nile-input>`); expect(el.hasAttribute('filled')).to.be.true; });
    it('84. pill reflects', async () => { const el = await fixture(html `<nile-input pill></nile-input>`); expect(el.hasAttribute('pill')).to.be.true; });
    it('85. disabled reflects', async () => { const el = await fixture(html `<nile-input disabled></nile-input>`); expect(el.hasAttribute('disabled')).to.be.true; });
    it('86. no svg', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('svg')).to.be.null; });
    it('87. no textarea', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('textarea')).to.be.null; });
    it('88. no select', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('select')).to.be.null; });
    it('89. title attr', async () => { const el = await fixture(html `<nile-input title="IN"></nile-input>`); expect(el.title).to.equal('IN'); });
    it('90. no h1', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('h1')).to.be.null; });
    it('91. no p', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('p')).to.be.null; });
    it('92. no hr', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('hr')).to.be.null; });
    it('93. no pre', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('pre')).to.be.null; });
    it('94. no code', async () => { const el = await fixture(html `<nile-input></nile-input>`); expect(el.shadowRoot.querySelector('code')).to.be.null; });
    it('95. type number', async () => { const el = await fixture(html `<nile-input type="number"></nile-input>`); expect(el.type).to.equal('number'); });
    it('96. type email', async () => { const el = await fixture(html `<nile-input type="email"></nile-input>`); expect(el.type).to.equal('email'); });
    it('97. type search', async () => { const el = await fixture(html `<nile-input type="search"></nile-input>`); expect(el.type).to.equal('search'); });
    it('98. type tel', async () => { const el = await fixture(html `<nile-input type="tel"></nile-input>`); expect(el.type).to.equal('tel'); });
    it('99. type url', async () => { const el = await fixture(html `<nile-input type="url"></nile-input>`); expect(el.type).to.equal('url'); });
    it('100. full integration', async () => { const el = await fixture(html `<nile-input type="email" name="email" value="test@test.com" size="large" filled pill class="inp" id="i1"></nile-input>`); expect(el.type).to.equal('email'); expect(el.name).to.equal('email'); expect(el.value).to.equal('test@test.com'); expect(el.size).to.equal('large'); expect(el.filled).to.be.true; expect(el.pill).to.be.true; expect(el.id).to.equal('i1'); });
});
//# sourceMappingURL=nile-input.test.js.map