Skip to content

v2.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 06 Jun 17:02
· 247 commits to main since this release
7c04ebb

Minor Changes

  • #494 730300e Thanks @calebeby! - New assertion: expect(page).toPassAxeTests()

    This assertion is based on the jest-puppeteer-axe package. (That package already works with Pleasantest, our new feature just formats error messages a little differently)

    It allows you to pass a page to be checked with the axe accessibility linter.

    test(
      'Axe tests',
      withBrowser(async ({ utils, page }) => {
        await utils.injectHTML(`
          <h1>Some html</h1>
        `);
    
        await expect(page).toPassAxeTests();
      }),
    );
  • #459 d36f234 Thanks @renovate! - Update dependency @testing-library/dom to v8.13.0.

    This adds support to filtering ByRole queries by description:

    // Select by accessible role and description
    await screen.getByRole('button', {
      description: /^items in the trash will be/i,
    });