lion/packages/progress-indicator/test/lion-progress-indicator.test.js
Goffert van Gool c224baa801
feat: add loading indicator (#857)
feat: add loading indicator
2020-08-06 13:35:26 +02:00

23 lines
842 B
JavaScript

import { expect, fixture } from '@open-wc/testing';
import { html } from '@lion/core';
import '../lion-progress-indicator.js';
describe('lion-progress-indicator', () => {
describe('Accessibility', () => {
it('adds a label', async () => {
const el = await fixture(html` <lion-progress-indicator></lion-progress-indicator> `);
expect(el.getAttribute('aria-label')).to.equal('Loading');
});
it('sets the right role', async () => {
const el = await fixture(html` <lion-progress-indicator></lion-progress-indicator> `);
expect(el.getAttribute('role')).to.equal('status');
});
it('sets aria-live to "polite"', async () => {
const el = await fixture(html` <lion-progress-indicator></lion-progress-indicator> `);
expect(el.getAttribute('aria-live')).to.equal('polite');
});
});
});