Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended/full rulesets cause "Not implemented: window.computedStyle(elt, pseudoElt)" Error #534

Open
FedeAbella opened this issue Jul 28, 2023 · 0 comments

Comments

@FedeAbella
Copy link

Running tests using the extended or full rulesets when some components are present, causes multiple Not implemented: window.computedStyle(elt, pseudoElt) errors to be shown via console.error. This does not happen with the base ruleset.

Environment:

node v18.15.0
@salesforce/sfdx-lwc-jest v1.3.0
@sa11y/[email protected]

Testing Component:
Markup:

<template>
  <form action="#">
    <input type="button" id="fail1InputButtonName" />
  </form>
</template>

Javascript:

import { LightningElement } from "lwc";

export default class TestSa11y2 extends LightningElement {}

Test:

import { createElement } from "lwc";
import TestSa11y2 from "c/testSa11y2";

describe("c-test-sa11-y2", () => {
  afterEach(() => {
    while (document.body.firstChild) {
      document.body.removeChild(document.body.firstChild);
    }
  });

  it("Tests input-button-name", async () => {
    const element = createElement("c-test-sa11-y2", {
      is: TestSa11y2
    });
    document.body.appendChild(element);

    await expect(element).not.toBeAccessible();
  });
});

Test Results:
Using extended ruleset (process.env.SA11Y_RULESET = "extended" in setupEnvVars.js) (test result file)
Using base ruleset (process.env.SA11Y_RULESET = "base" in setupEnvVars.js) (test result file)

Expected Behaviour: Changing rulesets should not cause errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant