Skip to content
Snippets Groups Projects
cta-button.e2e.ts 532 B
Newer Older
  • Learn to ignore specific revisions
  • import {newE2EPage} from '@stencil/core/testing';
    
    //import {AxePuppeteer} from 'axe-puppeteer';
    //import {Page} from 'puppeteer';
    
    
    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>");
    
    
        const results = await new AxePuppeteer((page as any) as Page).include('hy-cta-button').analyze();
        expect(results.violations).toHaveLength(0);