test: update TreeView tests to address flakiness #40391
ci.yml
on: pull_request
format
53s
lint
1m 49s
build-components-json
2m 53s
sizes
3m 35s
Matrix: examples
Matrix: test
Matrix: type-check
Annotations
70 errors
|
lint:
packages/react/src/TreeView/TreeView.tsx#L535
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L528
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L525
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L517
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L514
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L512
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L506
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.tsx#L495
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.test.tsx#L239
Unexpected console statement
|
|
lint:
packages/react/src/TreeView/TreeView.test.tsx#L237
Unexpected console statement
|
|
examples (react-19)
Spread types may only be created from object types.
|
|
examples (react-19)
'TrailingVisual' cannot be used as a JSX component.
|
|
examples (react-19)
JSX element type 'TrailingVisual' does not have any construct or call signatures.
|
|
examples (react-19)
'LeadingVisual' cannot be used as a JSX component.
|
|
examples (react-19)
JSX element type 'LeadingVisual' does not have any construct or call signatures.
|
|
examples (react-19)
@primer/react#build: command (/home/runner/work/react/react/packages/react) /opt/hostedtoolcache/node/24.14.1/x64/bin/npm run build exited (2)
|
|
examples (react-19)
'menuButtonChild.props' is of type 'unknown'.
|
|
examples (react-19)
Unused '@ts-expect-error' directive.
|
|
examples (react-19)
No overload matches this call.
|
|
examples (react-19)
Unused '@ts-expect-error' directive.
|
|
type-check (react-19)
'LeadingVisual' cannot be used as a JSX component.
|
|
type-check (react-19)
JSX element type 'LeadingVisual' does not have any construct or call signatures.
|
|
type-check (react-19)
Type 'RefObject<HTMLElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
|
|
type-check (react-19)
'menuButtonChild.props' is of type 'unknown'.
|
|
type-check (react-19)
Unused '@ts-expect-error' directive.
|
|
type-check (react-19)
No overload matches this call.
|
|
type-check (react-19)
Unused '@ts-expect-error' directive.
|
|
type-check (react-19)
Type 'RefObject<HTMLButtonElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
|
|
type-check (react-19)
Type 'RefObject<HTMLButtonElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
|
|
type-check (react-19)
Type 'RefObject<HTMLButtonElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
|
|
type-check (react-19)
'child.props' is of type 'unknown'.
|
|
type-check (react-19)
Spread types may only be created from object types.
|
|
type-check (react-19)
'TrailingVisual' cannot be used as a JSX component.
|
|
type-check (react-19)
JSX element type 'TrailingVisual' does not have any construct or call signatures.
|
|
type-check (react-19)
'LeadingVisual' cannot be used as a JSX component.
|
|
type-check (react-19)
JSX element type 'LeadingVisual' does not have any construct or call signatures.
|
|
type-check (react-19)
'menuButtonChild.props' is of type 'unknown'.
|
|
type-check (react-19)
Unused '@ts-expect-error' directive.
|
|
type-check (react-19)
No overload matches this call.
|
|
type-check (react-19)
Unused '@ts-expect-error' directive.
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > does nothing on a root-level end item:
packages/react/src/TreeView/TreeView.test.tsx#L588
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:588:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > does nothing on a root-level collapsed item:
packages/react/src/TreeView/TreeView.test.tsx#L561
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Parent"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:561:32
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > collapses an expanded item:
packages/react/src/TreeView/TreeView.test.tsx#L520
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Parent"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:520:32
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowUp > moves focus to the previous visible treeitem:
packages/react/src/TreeView/TreeView.test.tsx#L462
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item 1"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:462:27
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowDown > moves focus to the next visible treeitem:
packages/react/src/TreeView/TreeView.test.tsx#L405
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item 1"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:405:27
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should move focus to first treeitem when focusing back in after clicking on a treeitem's secondary action:
packages/react/src/TreeView/TreeView.test.tsx#L361
TestingLibraryElementError: Unable to find an element with the text: /Link in Item 2/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByText src/TreeView/TreeView.test.tsx:361:31
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should toggle when receiving focus from chevron click:
packages/react/src/TreeView/TreeView.test.tsx#L321
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name `/Focusable element/`
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:321:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should move focus to current treeitem by default:
packages/react/src/TreeView/TreeView.test.tsx#L282
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name `/Focusable element/`
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:282:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should render with containIntrinsicSize:
packages/react/src/TreeView/TreeView.test.tsx#L260
TestingLibraryElementError: Unable to find an element with the text: /Child/. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByText src/TreeView/TreeView.test.tsx:260:29
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should include `aria-expanded` when a SubTree contains content:
packages/react/src/TreeView/TreeView.test.tsx#L203
Error: Test timed out in 15000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
❯ it src/TreeView/TreeView.test.tsx:203:2
|
|
test (react-19)
Spread types may only be created from object types.
|
|
test (react-19)
'TrailingVisual' cannot be used as a JSX component.
|
|
test (react-19)
JSX element type 'TrailingVisual' does not have any construct or call signatures.
|
|
test (react-19)
'LeadingVisual' cannot be used as a JSX component.
|
|
test (react-19)
JSX element type 'LeadingVisual' does not have any construct or call signatures.
|
|
test (react-19)
'menuButtonChild.props' is of type 'unknown'.
|
|
test (react-19)
Unused '@ts-expect-error' directive.
|
|
test (react-19)
No overload matches this call.
|
|
test (react-19)
Unused '@ts-expect-error' directive.
|
|
test (react-19)
@primer/react#build: command (/home/runner/work/react/react/packages/react) /opt/hostedtoolcache/node/24.14.1/x64/bin/npm run build exited (2)
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > does nothing on a root-level end item:
packages/react/src/TreeView/TreeView.test.tsx#L588
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:588:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > does nothing on a root-level collapsed item:
packages/react/src/TreeView/TreeView.test.tsx#L561
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Parent"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:561:32
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowLeft > collapses an expanded item:
packages/react/src/TreeView/TreeView.test.tsx#L520
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Parent"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:520:32
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowUp > moves focus to the previous visible treeitem:
packages/react/src/TreeView/TreeView.test.tsx#L462
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item 1"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:462:27
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Keyboard interactions > ArrowDown > moves focus to the next visible treeitem:
packages/react/src/TreeView/TreeView.test.tsx#L405
TestingLibraryElementError: Unable to find an accessible element with the role "treeitem" and name "Item 1"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:405:27
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should move focus to first treeitem when focusing back in after clicking on a treeitem's secondary action:
packages/react/src/TreeView/TreeView.test.tsx#L361
TestingLibraryElementError: Unable to find an element with the text: /Link in Item 2/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByText src/TreeView/TreeView.test.tsx:361:31
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should toggle when receiving focus from chevron click:
packages/react/src/TreeView/TreeView.test.tsx#L321
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name `/Focusable element/`
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:321:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should move focus to current treeitem by default:
packages/react/src/TreeView/TreeView.test.tsx#L282
TestingLibraryElementError: Unable to find an accessible element with the role "button" and name `/Focusable element/`
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByRole src/TreeView/TreeView.test.tsx:282:26
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should render with containIntrinsicSize:
packages/react/src/TreeView/TreeView.test.tsx#L260
TestingLibraryElementError: Unable to find an element with the text: /Child/. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
❯ Object.getElementError ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:339:18
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1206:24
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1185:16
❯ ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:1228:18
❯ getByText src/TreeView/TreeView.test.tsx:260:29
|
|
[@primer/react (chromium)] src/TreeView/TreeView.test.tsx > Markup > should include `aria-expanded` when a SubTree contains content:
packages/react/src/TreeView/TreeView.test.tsx#L203
Error: Test timed out in 15000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
❯ it src/TreeView/TreeView.test.tsx:203:2
|