import { html, fixture, expect } from '@open-wc/testing'

import '../dist/index.es.js'


describe('o-counter ', () => {
  it('default prop', async () => {
    const el = await fixture(html`<o-counter></o-counter>`)
    expect(el.shadowRoot.innerHTML).to.equal(`<button>-</button><span>1</span><button>+</button>`)
  })

  it('count prop', async () => {
    const el = await fixture(html`<o-counter count="2"></o-counter>`)
    expect(el.shadowRoot.innerHTML).to.equal(`<button>-</button><span>2</span><button>+</button>`)
  })

})

@@ -23,16 +23,24 @@
 , expect
+, assert
  %7D from 
@@ -103,23 +103,19 @@
 ibe('o-c
-ounter 
+ard
 ', () =%3E
@@ -130,21 +130,16 @@
 'default
- prop
 ', async
@@ -189,128 +189,999 @@
 %3Co-c
-ounter%3E%3C/o-counter%3E%60)%0A    expect(el.shadowRoot.innerHTML).to.equal(%60%3Cbutton%3E-%3C/button%3E%3Cspan%3E1%3C/span%3E%3Cbutton%3E+%3C/button%3E%60)
+ard%3E%3C/o-card%3E%60)%0A    const card = el.shadowRoot.querySelector('div')%0A    const classList = card.getAttribute('class').split(' ')%0A    expect(classList.includes('o-card')).to.be.true%0A  %7D)%0A%0A  it('hoverable prop', async () =%3E %7B%0A    const el = await fixture(html%60%3Co-card hoverable=%22true%22%3E%3C/o-card%3E%60)%0A    const card = el.shadowRoot.querySelector('div')%0A    const classList = card.getAttribute('class').split(' ')%0A    expect(classList.includes('is-shadow-true')).to.be.true%0A  %7D)%0A%0A  it('bordered prop', async () =%3E %7B%0A    const el = await fixture(html%60%3Co-card bordered=true%3E%3C/o-card%3E%60)%0A    const card = el.shadowRoot.querySelector('div')%0A    const classList = card.getAttribute('class').split(' ')%0A    expect(classList.includes('is-border')).to.be.true%0A  %7D)%0A%0A  it('action prop', async () =%3E %7B%0A    const el = await fixture(html%60%3Co-card actions=%22%5B%7Bicon: 'add-ic-call-rounded'%7D%5D%22%3E%3C/o-card%3E%60)%0A    const domNode = el.shadowRoot.querySelector('o-icon-add-ic-call-rounded')%0A    expect(domNode).to.not.be.null
 %0A  %7D
@@ -1189,21 +1189,23 @@
 %0A%0A  it('
-count
+actions
  prop', 
@@ -1260,137 +1260,526 @@
 %3Co-c
-ounter count=%222%22%3E%3C/o-counter%3E%60)%0A    expect(el.shadowRoot.innerHTML).to.equal(%60%3Cbutton%3E-%3C/button%3E%3Cspan%3E2%3C/span%3E%3Cbutton%3E+%3C/button%3E%60
+ard actions=%22%5B%7Bicon: 'add-a-photo-rounded'%7D,%7Bicon: 'add-ic-call-rounded'%7D,%7Bicon: 'add-comment-rounded'%7D%5D%22%3E%3C/o-card%3E%60)%0A    const actions = el.shadowRoot.querySelector('.o-card-footer').childNodes%0A    assert.lengthOf(actions, 3, 'actions%5B%5D Rendered correctly')%0A  %7D)%0A%0A  it('title prop', async () =%3E %7B%0A    const el = await fixture(html%60%3Co-card title=%22test content%22%3E%3C/o-card%3E%60)%0A    const str = el.shadowRoot.querySelector('.o-card-title').innerHTML%0A    assert.equal(str, 'test content', '%7Bprops.title%7D equal %60test content%60'
 )%0A  

add unit-test