diff --git a/CHANGELOG.md b/CHANGELOG.md index c94b02db..49dcfc7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Added +- Add [data-testid] to items in the execution summary ([#391](https://github.com/cucumber/react-components/pull/391)) ## [23.1.0] - 2025-06-15 ### Changed diff --git a/src/components/app/ExecutionSummary.spec.tsx b/src/components/app/ExecutionSummary.spec.tsx index b10dfd2a..77f6fa98 100644 --- a/src/components/app/ExecutionSummary.spec.tsx +++ b/src/components/app/ExecutionSummary.spec.tsx @@ -52,7 +52,7 @@ describe('', () => { ) - expect(screen.getByTestId('setup.phrase')).to.contain.text( + expect(screen.getByTestId('cucumber.summary.setup.phrase')).to.contain.text( 'cucumber-js@8.0.0-rc.1 with node.js@16.13.1 on linux@5.11.0-1022-azure' ) }) diff --git a/src/components/app/ExecutionSummary.tsx b/src/components/app/ExecutionSummary.tsx index 486ef89e..624d3fc9 100644 --- a/src/components/app/ExecutionSummary.tsx +++ b/src/components/app/ExecutionSummary.tsx @@ -37,13 +37,13 @@ export const ExecutionSummary: FC = () => { <> {meta && ( - + - + with @@ -55,7 +55,7 @@ export const ExecutionSummary: FC = () => { )} - + @@ -68,7 +68,7 @@ export const ExecutionSummary: FC = () => { {startDate && ( - + )} {meta?.ci && ( - + )} {meta?.ci?.git && ( - + diff --git a/src/components/app/Header.tsx b/src/components/app/Header.tsx index a94b3733..4cccad7d 100644 --- a/src/components/app/Header.tsx +++ b/src/components/app/Header.tsx @@ -6,8 +6,12 @@ export const HeaderSection: FC = ({ children }) => { return
{children}
} -export const HeaderItem: FC = ({ children }) => { - return
{children}
+export const HeaderItem: FC> = ({ testId, children }) => { + return ( +
+ {children} +
+ ) } export const HeaderSubItem: FC = ({ children }) => {