diff --git a/docs/src/test-reporter-api/class-testcase.md b/docs/src/test-reporter-api/class-testcase.md index 82ab6ca521..1aa5379ac4 100644 --- a/docs/src/test-reporter-api/class-testcase.md +++ b/docs/src/test-reporter-api/class-testcase.md @@ -12,8 +12,7 @@ The list of annotations applicable to the current test. Includes: * annotations defined on the test or suite via [`method: Test.(call)`] and [`method: Test.describe`]; -* annotations implicitly added by methods [`method: Test.skip`], [`method: Test.fixme`] and [`method: Test.fail`]; -* annotations appended to [`property: TestInfo.annotations`] during the test execution. +* annotations implicitly added by methods [`method: Test.skip`], [`method: Test.fixme`] and [`method: Test.fail`] prior to test execution. Annotations are available during test execution through [`property: TestInfo.annotations`]. diff --git a/docs/src/test-reporter-api/class-testresult.md b/docs/src/test-reporter-api/class-testresult.md index 7674ac333d..0e60558632 100644 --- a/docs/src/test-reporter-api/class-testresult.md +++ b/docs/src/test-reporter-api/class-testresult.md @@ -14,6 +14,20 @@ A result of a single [TestCase] run. The list of files or buffers attached during the test execution through [`property: TestInfo.attachments`]. +## property: TestResult.annotations +* since: v1.52 +- type: <[Array]<[Object]>> + - `type` <[string]> Annotation type, for example `'skip'` or `'fail'`. + - `description` ?<[string]> Optional description. + +The list of annotations appended during test execution. Includes: +* annotations implicitly added by methods [`method: Test.skip`], [`method: Test.fixme`] and [`method: Test.fail`] during test execution; +* annotations appended to [`property: TestInfo.annotations`]. + +Annotations are available during test execution through [`property: TestInfo.annotations`]. + +Learn more about [test annotations](../test-annotations.md). + ## property: TestResult.duration * since: v1.10 - type: <[float]> diff --git a/packages/html-reporter/src/tabbedPane.tsx b/packages/html-reporter/src/tabbedPane.tsx index 02d0c6f3b1..af15b6b4fa 100644 --- a/packages/html-reporter/src/tabbedPane.tsx +++ b/packages/html-reporter/src/tabbedPane.tsx @@ -30,14 +30,18 @@ export const TabbedPane: React.FunctionComponent<{ selectedTab: string, setSelectedTab: (tab: string) => void }> = ({ tabs, selectedTab, setSelectedTab }) => { + const idPrefix = React.useId(); return