import { expect, fixture, html } from '@open-wc/testing';
import './nile-date-picker';
describe('NileDatePicker', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.tagName.toLowerCase()).to.equal('nile-date-picker'); });
    it('4. range defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.range).to.equal(false); });
    it('5. hideTypes defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.hideTypes).to.equal(false); });
    it('6. open defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.open).to.equal(false); });
    it('7. type defaults absolute', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.type).to.equal('absolute'); });
    it('8. showManualInputs defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.showManualInputs).to.equal(false); });
    it('9. allowClear defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.allowClear).to.equal(false); });
    it('10. hideTimeZone defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.hideTimeZone).to.equal(false); });
    it('11. doubleClickUnselect defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.doubleClickUnselect).to.equal(false); });
    it('12. dateFormat defaults DD/MM/YYYY', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.dateFormat).to.equal('DD/MM/YYYY'); });
    it('13. rangeSeparator defaults " - "', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.rangeSeparator).to.equal(' - '); });
    it('14. showYearDropdown defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.showYearDropdown).to.equal(false); });
    it('15. showMonthDropdown defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.showMonthDropdown).to.equal(false); });
    it('16. syncDatePicker defaults false', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.syncDatePicker).to.equal(false); });
    it('17. set range', async () => { const el = await fixture(html `<nile-date-picker range></nile-date-picker>`); expect(el.range).to.be.true; });
    it('18. set type relative', async () => { const el = await fixture(html `<nile-date-picker type="relative"></nile-date-picker>`); expect(el.type).to.equal('relative'); });
    it('19. has styles', async () => { expect((await import('./nile-date-picker')).NileDatePicker.styles).to.exist; });
    it('20. is defined', async () => { expect(customElements.get('nile-date-picker')).to.exist; });
    it('21. shadow mode', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('22. isConnected', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.isConnected).to.be.true; });
    it('23. removal', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('24. outerHTML', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.outerHTML).to.contain('nile-date-picker'); });
    it('25. matches', async () => { const el = await fixture(html `<nile-date-picker class="x"></nile-date-picker>`); expect(el.matches('.x')).to.be.true; });
    it('26. closest', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.closest('nile-date-picker')).to.equal(el); });
    it('27. cloneNode', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-date-picker'); });
    it('28. dispatchEvent', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
    it('29. updateComplete', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('30. render method', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.render).to.be.a('function'); });
    it('31. shadowRoot host', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.host).to.equal(el); });
    it('32. class attr', async () => { const el = await fixture(html `<nile-date-picker class="dp"></nile-date-picker>`); expect(el.classList.contains('dp')).to.be.true; });
    it('33. id attr', async () => { const el = await fixture(html `<nile-date-picker id="dp1"></nile-date-picker>`); expect(el.id).to.equal('dp1'); });
    it('34. hidden', async () => { const el = await fixture(html `<nile-date-picker hidden></nile-date-picker>`); expect(el.hidden).to.be.true; });
    it('35. nodeType', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.nodeType).to.equal(1); });
    it('36. localName', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.localName).to.equal('nile-date-picker'); });
    it('37. namespaceURI', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('38. ownerDocument', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.ownerDocument).to.equal(document); });
    it('39. dynamic range', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.range = true; await el.updateComplete; expect(el.range).to.be.true; });
    it('40. dynamic type', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.type = 'relative'; await el.updateComplete; expect(el.type).to.equal('relative'); });
    it('41. multiple instances', async () => { const c = await fixture(html `<div><nile-date-picker></nile-date-picker><nile-date-picker></nile-date-picker></div>`); expect(c.querySelectorAll('nile-date-picker').length).to.equal(2); });
    it('42. parent-child', async () => { const c = await fixture(html `<div><nile-date-picker></nile-date-picker></div>`); expect(c.querySelector('nile-date-picker').parentElement).to.equal(c); });
    it('43. createElement', async () => { const el = document.createElement('nile-date-picker'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('44. dataset', async () => { const el = await fixture(html `<nile-date-picker data-idx="0"></nile-date-picker>`); expect(el.dataset.idx).to.equal('0'); });
    it('45. classList add', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('46. getBoundingClientRect', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.getBoundingClientRect()).to.exist; });
    it('47. style attr', async () => { const el = await fixture(html `<nile-date-picker style="color:red"></nile-date-picker>`); expect(el.style.color).to.equal('red'); });
    it('48. data attr', async () => { const el = await fixture(html `<nile-date-picker data-x="1"></nile-date-picker>`); expect(el.getAttribute('data-x')).to.equal('1'); });
    it('49. aria-label', async () => { const el = await fixture(html `<nile-date-picker aria-label="DP"></nile-date-picker>`); expect(el.getAttribute('aria-label')).to.equal('DP'); });
    it('50. dir', async () => { const el = await fixture(html `<nile-date-picker dir="rtl"></nile-date-picker>`); expect(el.dir).to.equal('rtl'); });
    it('51. lang attr', async () => { const el = await fixture(html `<nile-date-picker lang="en"></nile-date-picker>`); expect(el.lang).to.equal('en'); });
    it('52. tabindex', async () => { const el = await fixture(html `<nile-date-picker tabindex="0"></nile-date-picker>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('53. requestUpdate', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('54. shadow childNodes', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('55. scrollIntoView', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('56. focus method', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.focus).to.be.a('function'); });
    it('57. blur method', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.blur).to.be.a('function'); });
    it('58. class toggle', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.classList.toggle('a'); expect(el.classList.contains('a')).to.be.true; });
    it('59. toggle hidden', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.hidden = true; expect(el.hidden).to.be.true; });
    it('60. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
    it('61. nested in div', async () => { const c = await fixture(html `<div><nile-date-picker></nile-date-picker></div>`); expect(c.querySelector('nile-date-picker')).to.exist; });
    it('62. no table', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('table')).to.be.null; });
    it('63. no nav', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('nav')).to.be.null; });
    it('64. no aside', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('aside')).to.be.null; });
    it('65. no textarea', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('textarea')).to.be.null; });
    it('66. no video', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('video')).to.be.null; });
    it('67. no audio', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('audio')).to.be.null; });
    it('68. no canvas', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
    it('69. setAttribute data', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.setAttribute('data-test', '1'); expect(el.dataset.test).to.equal('1'); });
    it('70. removeAttribute hidden', async () => { const el = await fixture(html `<nile-date-picker hidden></nile-date-picker>`); el.removeAttribute('hidden'); expect(el.hidden).to.be.false; });
    it('71. setAttribute class', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.setAttribute('class', 'test'); expect(el.classList.contains('test')).to.be.true; });
    it('72. aria-describedby', async () => { const el = await fixture(html `<nile-date-picker aria-describedby="d"></nile-date-picker>`); expect(el.getAttribute('aria-describedby')).to.equal('d'); });
    it('73. multiple re-renders', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); for (let i = 0; i < 3; i++) {
        el.requestUpdate();
        await el.updateComplete;
    } expect(el.shadowRoot).to.not.be.null; });
    it('74. type reflects', async () => { const el = await fixture(html `<nile-date-picker type="relative"></nile-date-picker>`); expect(el.getAttribute('type')).to.equal('relative'); });
    it('75. dateFormat reflects', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.getAttribute('dateformat')).to.exist; });
    it('76. no ul', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('ul')).to.be.null; });
    it('77. no h1', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('h1')).to.be.null; });
    it('78. no pre', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('pre')).to.be.null; });
    it('79. no code', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('code')).to.be.null; });
    it('80. title attr', async () => { const el = await fixture(html `<nile-date-picker title="DP"></nile-date-picker>`); expect(el.title).to.equal('DP'); });
    it('81. contains', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.contains(el)).to.be.true; });
    it('82. no anchor', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
    it('83. no img', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
    it('84. dynamic dateFormat', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.dateFormat = 'MM/DD/YYYY'; await el.updateComplete; expect(el.dateFormat).to.equal('MM/DD/YYYY'); });
    it('85. dynamic open', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.open = true; await el.updateComplete; expect(el.open).to.be.true; });
    it('86. dynamic allowClear', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.allowClear = true; await el.updateComplete; expect(el.allowClear).to.be.true; });
    it('87. dynamic hideTypes', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.hideTypes = true; await el.updateComplete; expect(el.hideTypes).to.be.true; });
    it('88. dynamic hideTimeZone', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.hideTimeZone = true; await el.updateComplete; expect(el.hideTimeZone).to.be.true; });
    it('89. dynamic showManualInputs', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.showManualInputs = true; await el.updateComplete; expect(el.showManualInputs).to.be.true; });
    it('90. dynamic showYearDropdown', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.showYearDropdown = true; await el.updateComplete; expect(el.showYearDropdown).to.be.true; });
    it('91. dynamic showMonthDropdown', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.showMonthDropdown = true; await el.updateComplete; expect(el.showMonthDropdown).to.be.true; });
    it('92. dynamic syncDatePicker', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.syncDatePicker = true; await el.updateComplete; expect(el.syncDatePicker).to.be.true; });
    it('93. dynamic rangeSeparator', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.rangeSeparator = ' to '; await el.updateComplete; expect(el.rangeSeparator).to.equal(' to '); });
    it('94. hideDurationFields defaults empty', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.hideDurationFields).to.exist; });
    it('95. allowedDates defaults', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.allowedDates).to.exist; });
    it('96. no hr', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('hr')).to.be.null; });
    it('97. no p tag', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); expect(el.shadowRoot.querySelector('p')).to.be.null; });
    it('98. role attr', async () => { const el = await fixture(html `<nile-date-picker role="dialog"></nile-date-picker>`); expect(el.getAttribute('role')).to.equal('dialog'); });
    it('99. set doubleClickUnselect', async () => { const el = await fixture(html `<nile-date-picker></nile-date-picker>`); el.doubleClickUnselect = true; await el.updateComplete; expect(el.doubleClickUnselect).to.be.true; });
    it('100. full integration', async () => { const el = await fixture(html `<nile-date-picker type="absolute" range class="dp" id="dp1"></nile-date-picker>`); expect(el.type).to.equal('absolute'); expect(el.range).to.be.true; expect(el.id).to.equal('dp1'); expect(el.dateFormat).to.equal('DD/MM/YYYY'); });
});
//# sourceMappingURL=nile-date-picker.test.js.map