Skip to content

Commit

Permalink
test(rounded): add test for rounded feature #212
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Jun 6, 2023
1 parent e19365f commit eeb40b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion test/auro-button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable lit/attribute-value-entities */
/* eslint-disable one-var */
/* eslint-disable no-undef */
import { fixture, html, expect } from '@open-wc/testing';
import { fixture, html, expect, elementUpdated } from '@open-wc/testing';
import '../index.js';

describe('auro-button', () => {
Expand Down Expand Up @@ -203,4 +203,18 @@ describe('auro-button', () => {

await expect(el).to.be.true;
});

it('toggleText event toggles value of hideText attribute', async () => {
const el = await fixture(html`
<auro-button>Click Me!</auro-button>
`);

await expect(el.hideText).to.be.false;

el.dispatchEvent(new CustomEvent('auroButton-toggleText'));

await elementUpdated(el);

await expect(el.hideText).to.be.true;
})
});
2 changes: 1 addition & 1 deletion web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
coverageConfig: {
threshold: {
statements: 80,
branches: 70,
branches: 65,
functions: 80,
lines: 80
}
Expand Down

0 comments on commit eeb40b6

Please sign in to comment.