[Bug]: findTabs() always return null in the test
See original GitHub issueBrowser
No response
Package version
v3.0.11
React version
v18.0.0
Description
When I use the Tabs
component, I can not find it by findTabs()
method, it always return null.
I add Tabs
as the content in Container
, I can findHeader
, findActions
, findDescription
, but can not findTabs()
Source code
<Container
header={
<Header
variant="h2"
description="Container description"
actions={
<SpaceBetween
direction="horizontal"
size="xs"
>
<Button>Action</Button>
<Button>Another action</Button>
</SpaceBetween>
}
>
<Tabs
tabs={[
{
label: "HOME",
id: "home",
content: "home page"
},
{
label: "feedback",
id: "feedback",
content: "feedback",
},
{
label: "setting",
id: "setting",
content: "setting",
}
]}
/>
</Container>
Reproduction
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Moq test on inherited class always returns null - Stack Overflow
I am having a problem with setting up Unit Tests for a controller that implements a repository pattern. I want to ...
Read more >callTestCase allways returns null if it fails, even If exists a ...
Hello. I´ve some shared test cases that return data. Some days ago I´ve realized that, if the test fails, it is returning null...
Read more >Unit Test Method Always Returns A Null Value - .NET - SitePoint
I'm trying to unit test a method using MSTest and MOQ but it always fails. The following is a method in the BL...
Read more >`queryByText` always return null · Issue #636 - GitHub
Describe the bug I set up a new react-native project and install the testing library following the docs. But it seems all the...
Read more >Custom Setting returns null in apex test
In it I have a lookup element to a custom setting that returns a string based on a date value. When I run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is required to import components in and the test utils from the same package.
If you are importing component from your custom package
abc
, the test-utils should be imported fromabc/test-utils/dom
P.S. for your custom packages it is recommended to use your own NPM namespace, because npm will deny publishing if you decide to publish your themed package.
Could you post your test code as well? Currently we only see the source code