Skip to content

Commit

Permalink
a11y: add test for help.html
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-mark committed Nov 15, 2019
1 parent f490e8d commit 25a5edd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/spec/puppeteer-axe-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe("Puppeteer accessibility tests for the Python Editor.", function() {
'use strict';

const editorURL = 'http://localhost:5000/editor.html';
const helpURL = 'http://localhost:5000/help.html';
let browser = null;

beforeAll(async () => {
Expand Down Expand Up @@ -57,4 +58,13 @@ describe("Puppeteer accessibility tests for the Python Editor.", function() {
});
await page.close();
});

test( 'Checks the help.html page with Axe', async () => {
// First, run some code which loads the content of the page.
const page = await browser.newPage();
await page.goto(helpURL);
await new AxePuppeteer(page).analyze();
await expect(page).toPassAxeTests();
await page.close();
});
});

0 comments on commit 25a5edd

Please sign in to comment.