Skip to content

Commit

Permalink
Merge branch 'master' into pw_remove_awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenogorman authored Dec 17, 2024
2 parents 27a9022 + e183752 commit 488de4a
Show file tree
Hide file tree
Showing 62 changed files with 1,668 additions and 782 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.47.0-jammy
image: mcr.microsoft.com/playwright:v1.49.1-noble
strategy:
fail-fast: false
matrix:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
### [144.22.1](https://github.com/Sage/carbon/compare/v144.22.0...v144.22.1) (2024-12-17)


### Performance Improvements

* **pipeline:** update Playwright image to latest ([873c077](https://github.com/Sage/carbon/commit/873c07774e8ca28cb5665c16dc9e9ea98761a10d))

## [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.1",
"description": "A library of reusable React components for easily building user interfaces.",
"files": [
"lib",
Expand Down
3 changes: 2 additions & 1 deletion playwright-ct.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig, devices } from "@playwright/experimental-ct-react17";

import { resolve } from "path";

const playwrightDir = resolve(__dirname, "./playwright");
Expand Down Expand Up @@ -30,7 +31,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
trace: "retain-on-failure",
/* Port to use for Playwright component endpoint. */
ctPort: 3100,
/* Custom config for internal bundler Playwright uses for component tests. See https://playwright.dev/docs/test-components#under-the-hood */
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 488de4a

Please sign in to comment.