Newer
Older

Ekaterina Kondareva
committed
import {newE2EPage} from '@stencil/core/testing';
//import {AxePuppeteer} from 'axe-puppeteer';
//import {Page} from 'puppeteer';

Ekaterina Kondareva
committed
describe('hy-cta-button', () => {
it('cta button passes axe a11y tests', async () => {
const page = await newE2EPage();
await page.setContent("<hy-cta-button href='#'>Hello</hy-cta-button>");

Ekaterina Kondareva
committed
const results = await new AxePuppeteer((page as any) as Page).include('hy-cta-button').analyze();
expect(results.violations).toHaveLength(0);

Ekaterina Kondareva
committed
await page.close();
});
});