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