import { expect, fixture, html } from '@open-wc/testing';
import './nile-progress-bar';
describe('NileProgressBar', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.tagName.toLowerCase()).to.equal('nile-progress-bar'); });
    it('4. value defaults 0', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.value).to.equal(0); });
    it('5. container part', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('[part="container"]')).to.exist; });
    it('6. progress-bar part', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('[part="progress-bar"]')).to.exist; });
    it('7. remaining part', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('[part="remaining"]')).to.exist; });
    it('8. progress part', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('[part="progress"]')).to.exist; });
    it('9. container class', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('.nile-progress-bar__container')).to.exist; });
    it('10. progress-bar class', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('.nile-progress-bar__progress-bar')).to.exist; });
    it('11. value reflected', async () => { const el = await fixture(html `<nile-progress-bar value="50"></nile-progress-bar>`); expect(el.getAttribute('value')).to.equal('50'); });
    it('12. value settable', async () => { const el = await fixture(html `<nile-progress-bar value="30"></nile-progress-bar>`); expect(el.value).to.equal(30); });
    it('13. progress width', async () => { const el = await fixture(html `<nile-progress-bar value="50"></nile-progress-bar>`); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('50%'); });
    it('14. progress width 0', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('0%'); });
    it('15. progress width 100', async () => { const el = await fixture(html `<nile-progress-bar value="100"></nile-progress-bar>`); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('100%'); });
    it('16. dynamic value', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.value = 75; await el.updateComplete; const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('75%'); });
    it('17. nile-complete at 100', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); let fired = false; el.addEventListener('nile-complete', () => (fired = true)); el.value = 100; await el.updateComplete; expect(fired).to.be.true; });
    it('18. no nile-complete below 100', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); let fired = false; el.addEventListener('nile-complete', () => (fired = true)); el.value = 50; await el.updateComplete; expect(fired).to.be.false; });
    it('19. invalid value reset', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.value = 150; await el.updateComplete; expect(el.value).to.equal(0); });
    it('20. negative value reset', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.value = -10; await el.updateComplete; expect(el.value).to.equal(0); });
    it('21. has styles', async () => { expect((await import('./nile-progress-bar')).NileProgressBar.styles).to.exist; });
    it('22. is defined', async () => { expect(customElements.get('nile-progress-bar')).to.exist; });
    it('23. shadow mode', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('24. isConnected', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.isConnected).to.be.true; });
    it('25. removal', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('26. outerHTML', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.outerHTML).to.contain('nile-progress-bar'); });
    it('27. matches', async () => { const el = await fixture(html `<nile-progress-bar class="x"></nile-progress-bar>`); expect(el.matches('nile-progress-bar.x')).to.be.true; });
    it('28. closest', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.closest('nile-progress-bar')).to.equal(el); });
    it('29. cloneNode', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-progress-bar'); });
    it('30. dispatchEvent', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
    it('31. updateComplete', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('32. requestUpdate', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('33. render method', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.render).to.be.a('function'); });
    it('34. shadowRoot host', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.host).to.equal(el); });
    it('35. class attr', async () => { const el = await fixture(html `<nile-progress-bar class="p"></nile-progress-bar>`); expect(el.classList.contains('p')).to.be.true; });
    it('36. id attr', async () => { const el = await fixture(html `<nile-progress-bar id="p1"></nile-progress-bar>`); expect(el.id).to.equal('p1'); });
    it('37. style attr', async () => { const el = await fixture(html `<nile-progress-bar style="color:red"></nile-progress-bar>`); expect(el.style.color).to.equal('red'); });
    it('38. data attr', async () => { const el = await fixture(html `<nile-progress-bar data-x="1"></nile-progress-bar>`); expect(el.getAttribute('data-x')).to.equal('1'); });
    it('39. hidden', async () => { const el = await fixture(html `<nile-progress-bar hidden></nile-progress-bar>`); expect(el.hidden).to.be.true; });
    it('40. dir', async () => { const el = await fixture(html `<nile-progress-bar dir="rtl"></nile-progress-bar>`); expect(el.dir).to.equal('rtl'); });
    it('41. nodeType', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.nodeType).to.equal(1); });
    it('42. multiple instances', async () => { const c = await fixture(html `<div><nile-progress-bar></nile-progress-bar><nile-progress-bar></nile-progress-bar></div>`); expect(c.querySelectorAll('nile-progress-bar').length).to.equal(2); });
    it('43. parent-child', async () => { const c = await fixture(html `<div><nile-progress-bar></nile-progress-bar></div>`); expect(c.querySelector('nile-progress-bar').parentElement).to.equal(c); });
    it('44. localName', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.localName).to.equal('nile-progress-bar'); });
    it('45. namespaceURI', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('46. ownerDocument', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.ownerDocument).to.equal(document); });
    it('47. value type number', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(typeof el.value).to.equal('number'); });
    it('48. classList add', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('49. dataset', async () => { const el = await fixture(html `<nile-progress-bar data-idx="0"></nile-progress-bar>`); expect(el.dataset.idx).to.equal('0'); });
    it('50. getBoundingClientRect', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.getBoundingClientRect()).to.exist; });
    it('51. ul element', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('ul')).to.exist; });
    it('52. li element', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('li')).to.exist; });
    it('53. span element', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('span')).to.exist; });
    it('54. no slots', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelectorAll('slot').length).to.equal(0); });
    it('55. no inputs', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelectorAll('input').length).to.equal(0); });
    it('56. no buttons', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelectorAll('button').length).to.equal(0); });
    it('57. aria-label', async () => { const el = await fixture(html `<nile-progress-bar aria-label="Progress"></nile-progress-bar>`); expect(el.getAttribute('aria-label')).to.equal('Progress'); });
    it('58. role', async () => { const el = await fixture(html `<nile-progress-bar role="progressbar"></nile-progress-bar>`); expect(el.getAttribute('role')).to.equal('progressbar'); });
    it('59. createElement', async () => { const el = document.createElement('nile-progress-bar'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('60. setAttribute value', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.setAttribute('value', '60'); await el.updateComplete; expect(el.value).to.equal(60); });
    it('61. removeAttribute value', async () => { const el = await fixture(html `<nile-progress-bar value="50"></nile-progress-bar>`); el.removeAttribute('value'); await el.updateComplete; expect(el.getAttribute('value')).to.be.null; });
    it('62. rapid value changes', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); for (let i = 0; i <= 100; i += 25) {
        el.value = i;
        await el.updateComplete;
    } expect(el.value).to.equal(100); });
    it('63. value 1', async () => { const el = await fixture(html `<nile-progress-bar value="1"></nile-progress-bar>`); expect(el.value).to.equal(1); });
    it('64. value 99', async () => { const el = await fixture(html `<nile-progress-bar value="99"></nile-progress-bar>`); expect(el.value).to.equal(99); });
    it('65. no form', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('form')).to.be.null; });
    it('66. title attr', async () => { const el = await fixture(html `<nile-progress-bar title="P"></nile-progress-bar>`); expect(el.title).to.equal('P'); });
    it('67. lang attr', async () => { const el = await fixture(html `<nile-progress-bar lang="en"></nile-progress-bar>`); expect(el.lang).to.equal('en'); });
    it('68. tabindex', async () => { const el = await fixture(html `<nile-progress-bar tabindex="0"></nile-progress-bar>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('69. childElementCount', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.childElementCount).to.equal(0); });
    it('70. shadow childNodes', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('71. scrollIntoView', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('72. focus method', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.focus).to.be.a('function'); });
    it('73. blur method', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.blur).to.be.a('function'); });
    it('74. value 25', async () => { const el = await fixture(html `<nile-progress-bar value="25"></nile-progress-bar>`); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('25%'); });
    it('75. value 75', async () => { const el = await fixture(html `<nile-progress-bar value="75"></nile-progress-bar>`); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('75%'); });
    it('76. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
    it('77. aria-valuenow', async () => { const el = await fixture(html `<nile-progress-bar aria-valuenow="50"></nile-progress-bar>`); expect(el.getAttribute('aria-valuenow')).to.equal('50'); });
    it('78. aria-valuemin', async () => { const el = await fixture(html `<nile-progress-bar aria-valuemin="0"></nile-progress-bar>`); expect(el.getAttribute('aria-valuemin')).to.equal('0'); });
    it('79. aria-valuemax', async () => { const el = await fixture(html `<nile-progress-bar aria-valuemax="100"></nile-progress-bar>`); expect(el.getAttribute('aria-valuemax')).to.equal('100'); });
    it('80. nile-complete detail', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); let detail; el.addEventListener('nile-complete', ((e) => { detail = e.detail; })); el.value = 100; await el.updateComplete; expect(detail).to.exist; });
    it('81. dynamic value 0 to 100', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.value = 100; await el.updateComplete; const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('100%'); });
    it('82. value resets after invalid', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.value = 200; await el.updateComplete; await el.updateComplete; expect(el.value).to.equal(0); });
    it('83. textContent empty', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.textContent.trim()).to.equal(''); });
    it('84. innerHTML empty', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.innerHTML.trim()).to.equal(''); });
    it('85. hasAttribute value', async () => { const el = await fixture(html `<nile-progress-bar value="10"></nile-progress-bar>`); expect(el.hasAttribute('value')).to.be.true; });
    it('86. no anchor', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
    it('87. no img', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
    it('88. shadow dom elements', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelectorAll('div').length).to.be.greaterThanOrEqual(1); });
    it('89. nested in div', async () => { const c = await fixture(html `<div><nile-progress-bar value="50"></nile-progress-bar></div>`); const el = c.querySelector('nile-progress-bar'); expect(el.value).to.equal(50); });
    it('90. multiple with different values', async () => { const c = await fixture(html `<div><nile-progress-bar value="25"></nile-progress-bar><nile-progress-bar value="75"></nile-progress-bar></div>`); const els = c.querySelectorAll('nile-progress-bar'); expect(els[0].value).to.equal(25); expect(els[1].value).to.equal(75); });
    it('91. toggle hidden', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.hidden = true; expect(el.hidden).to.be.true; el.hidden = false; expect(el.hidden).to.be.false; });
    it('92. class toggle', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.classList.toggle('active'); expect(el.classList.contains('active')).to.be.true; });
    it('93. setAttribute class', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); el.setAttribute('class', 'test'); expect(el.classList.contains('test')).to.be.true; });
    it('94. no video', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('video')).to.be.null; });
    it('95. no audio', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('audio')).to.be.null; });
    it('96. no canvas', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
    it('97. no svg', async () => { const el = await fixture(html `<nile-progress-bar></nile-progress-bar>`); expect(el.shadowRoot.querySelector('svg')).to.be.null; });
    it('98. value boundary 100', async () => { const el = await fixture(html `<nile-progress-bar value="100"></nile-progress-bar>`); expect(el.value).to.equal(100); });
    it('99. value boundary 0', async () => { const el = await fixture(html `<nile-progress-bar value="0"></nile-progress-bar>`); expect(el.value).to.equal(0); });
    it('100. full integration', async () => { const el = await fixture(html `<nile-progress-bar value="50" class="p" id="p1" role="progressbar" aria-label="Progress"></nile-progress-bar>`); expect(el.value).to.equal(50); expect(el.id).to.equal('p1'); expect(el.getAttribute('role')).to.equal('progressbar'); const p = el.shadowRoot.querySelector('[part="progress"]'); expect(p.style.width).to.equal('50%'); });
});
//# sourceMappingURL=nile-progress-bar.test.js.map