diff --git a/packages/pharos/src/components/table-body/pharos-table-body.test.ts b/packages/pharos/src/components/table-body/pharos-table-body.test.ts new file mode 100644 index 00000000..8fd03932 --- /dev/null +++ b/packages/pharos/src/components/table-body/pharos-table-body.test.ts @@ -0,0 +1,19 @@ +import { expect } from 'chai'; +import { fixture, html } from '@open-wc/testing'; +import { PharosTableBody } from './pharos-table-body'; + +describe('PharosTableBody', () => { + let component: PharosTableBody; + beforeEach(async () => { + component = await fixture(html` `); + }); + + it('should have the correct role attribute on the custom element', async () => { + expect(component.getAttribute('role')).to.equal('rowgroup'); + }); + + it('should have the correct display style on the custom element', async () => { + const displayValue = window.getComputedStyle(component, null).getPropertyValue('display'); + expect(displayValue).to.equal('table-row-group'); + }); +}); diff --git a/packages/pharos/src/components/table-cell/pharos-table-cell.test.ts b/packages/pharos/src/components/table-cell/pharos-table-cell.test.ts new file mode 100644 index 00000000..5942c36c --- /dev/null +++ b/packages/pharos/src/components/table-cell/pharos-table-cell.test.ts @@ -0,0 +1,19 @@ +import { expect } from 'chai'; +import { fixture, html } from '@open-wc/testing'; +import { PharosTableCell } from './pharos-table-cell'; + +describe('PharosTableCell', () => { + let component: PharosTableCell; + beforeEach(async () => { + component = await fixture(html` `); + }); + + it('should have the correct role attribute on the custom element', async () => { + expect(component.getAttribute('role')).to.equal('cell'); + }); + + it('should have the correct display style on the custom element', async () => { + const displayValue = window.getComputedStyle(component, null).getPropertyValue('display'); + expect(displayValue).to.equal('table-cell'); + }); +}); diff --git a/packages/pharos/src/components/table-row/pharos-table-row.test.ts b/packages/pharos/src/components/table-row/pharos-table-row.test.ts new file mode 100644 index 00000000..f5d8063b --- /dev/null +++ b/packages/pharos/src/components/table-row/pharos-table-row.test.ts @@ -0,0 +1,19 @@ +import { expect } from 'chai'; +import { fixture, html } from '@open-wc/testing'; +import { PharosTableRow } from './pharos-table-row'; + +describe('PharosTableRow', () => { + let component: PharosTableRow; + beforeEach(async () => { + component = await fixture(html` `); + }); + + it('should have the correct role attribute on the custom element', async () => { + expect(component.getAttribute('role')).to.equal('row'); + }); + + it('should have the correct display style on the custom element', async () => { + const displayValue = window.getComputedStyle(component, null).getPropertyValue('display'); + expect(displayValue).to.equal('table-row'); + }); +});