Skip to content

Commit

Permalink
Merge branch 'master' into playwright-pipeline-investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
damienrobson-sage authored Dec 17, 2024
2 parents 873c077 + 4b63924 commit 00c12d5
Show file tree
Hide file tree
Showing 55 changed files with 1,180 additions and 488 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [144.22.0](https://github.com/Sage/carbon/compare/v144.21.1...v144.22.0) (2024-12-16)


### Features

* **typography:** allow listitem to inherit variant from parent list ([ad4f4e7](https://github.com/Sage/carbon/commit/ad4f4e761cf14927a5a2e122e4450f9ee995722d)), closes [#5413](https://github.com/Sage/carbon/issues/5413)

### [144.21.1](https://github.com/Sage/carbon/compare/v144.21.0...v144.21.1) (2024-12-13)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carbon-react",
"version": "144.21.1",
"version": "144.22.0",
"description": "A library of reusable React components for easily building user interfaces.",
"files": [
"lib",
Expand Down
10 changes: 7 additions & 3 deletions src/__internal__/checkable-input/checkable-input.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import { act, render, screen } from "@testing-library/react";
import CheckableInput from ".";

test("renders `label` with expected id when `id` prop is passed", () => {
Expand Down Expand Up @@ -40,7 +40,9 @@ test("renders input with 'aria-describedby' as the id of the validation tooltip

expect(input).not.toHaveAttribute("aria-describedby");

input.focus();
act(() => {
input.focus();
});

expect(input).toHaveAttribute("aria-describedby", "foo-validation");
});
Expand All @@ -59,7 +61,9 @@ test("appends the id of the validation tooltip to the input's 'aria-describedby'

expect(input).toHaveAttribute("aria-describedby", "foo-field-help");

input.focus();
act(() => {
input.focus();
});

expect(input).toHaveAttribute(
"aria-describedby",
Expand Down
13 changes: 9 additions & 4 deletions src/__internal__/fieldset/fieldset.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { act, render, screen, within } from "@testing-library/react";
import Fieldset from ".";
import { testStyledSystemMargin } from "../../__spec_helper__/__internal__/test-utils";

Expand Down Expand Up @@ -96,11 +96,16 @@ test("sets `aria-describedby` on help icon as tooltip content when focused and r
<input />
</Fieldset>,
);

const help = screen.getByRole("button", { name: "help" });
help.focus();

act(() => {
help.focus();
});
expect(help).toHaveAccessibleDescription("label help");
help.blur();

act(() => {
help.blur();
});
expect(help).not.toHaveAttribute("aria-describedby");
});

Expand Down
Loading

0 comments on commit 00c12d5

Please sign in to comment.