-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dom): DOM - toContainElement (#132)
- Loading branch information
1 parent
975c8b2
commit 8d7ffba
Showing
5 changed files
with
146 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/dom/test/unit/lib/fixtures/nestedElementsTestComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ReactElement } from "react"; | ||
|
||
export function NestedElementsTestComponent(): ReactElement { | ||
return ( | ||
<span data-testid="grandparent"> | ||
<span data-testid="parent"> | ||
<span data-testid="child"> | ||
<span> | ||
<span> | ||
<span> | ||
<span data-testid="deep-child"></span> | ||
</span> | ||
</span> | ||
</span> | ||
</span> | ||
</span> | ||
<svg data-testid="svg-element"></svg> | ||
</span> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ReactElement } from "react"; | ||
|
||
export function SimpleTestComponent(): ReactElement { | ||
return ( | ||
<div> | ||
<button>click me</button> | ||
</div> | ||
); | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/dom/test/unit/lib/fixtures/withAttributesTestComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ReactElement } from "react"; | ||
|
||
export function WithAttributesTestComponent(): ReactElement { | ||
return ( | ||
<button role="button" type="submit" className="btn primary" disabled={true}> | ||
click me | ||
</button> | ||
); | ||
} |