-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix validateDOMNesting warning (#7508)
Signed-off-by: Eng Zer Jun <[email protected]> Co-authored-by: Cee Chen <[email protected]>
- Loading branch information
Showing
17 changed files
with
1,050 additions
and
718 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
8 changes: 5 additions & 3 deletions
8
src/components/table/__snapshots__/table_footer.test.tsx.snap
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiTableFooter is rendered 1`] = ` | ||
<div> | ||
<table> | ||
<tfoot | ||
aria-label="aria-label" | ||
class="testClass1 testClass2 emotion-euiTestCss" | ||
data-test-subj="test subject string" | ||
> | ||
<tr> | ||
children | ||
<td> | ||
children | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</div> | ||
</table> | ||
`; |
256 changes: 152 additions & 104 deletions
256
src/components/table/__snapshots__/table_footer_cell.test.tsx.snap
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 |
---|---|---|
@@ -1,129 +1,177 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiTableFooterCell align defaults to left 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell align renders center when specified 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent euiTableCellContent--alignCenter" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent euiTableCellContent--alignCenter" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell align renders right when specified 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent euiTableCellContent--alignRight" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
> | ||
<div | ||
class="euiTableCellContent euiTableCellContent--alignRight" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
/> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell is rendered 1`] = ` | ||
<td | ||
aria-label="aria-label" | ||
class="euiTableFooterCell testClass1 testClass2 emotion-euiTestCss" | ||
data-test-subj="test subject string" | ||
> | ||
<div | ||
class="euiTableCellContent testClass1 testClass2 emotion-euiTestCss" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
children | ||
</span> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
aria-label="aria-label" | ||
class="euiTableFooterCell testClass1 testClass2 emotion-euiTestCss" | ||
data-test-subj="test subject string" | ||
> | ||
<div | ||
class="euiTableCellContent testClass1 testClass2 emotion-euiTestCss" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
children | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell width and style accepts style attribute 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 20%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 20%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell width and style accepts width attribute 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 10%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 10%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell width and style accepts width attribute as number 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 100px;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 100px;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableFooterCell width and style resolves style and width attribute 1`] = ` | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 10%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
<table> | ||
<tfoot> | ||
<tr> | ||
<td | ||
class="euiTableFooterCell" | ||
style="width: 10%;" | ||
> | ||
<div | ||
class="euiTableCellContent" | ||
> | ||
<span | ||
class="euiTableCellContent__text" | ||
> | ||
Test | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
`; |
40 changes: 22 additions & 18 deletions
40
src/components/table/__snapshots__/table_header.test.tsx.snap
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 |
---|---|---|
@@ -1,25 +1,29 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiTableHeader is rendered 1`] = ` | ||
<thead | ||
aria-label="aria-label" | ||
class="testClass1 testClass2 emotion-euiTestCss" | ||
data-test-subj="test subject string" | ||
> | ||
<tr> | ||
<td> | ||
children | ||
</td> | ||
</tr> | ||
</thead> | ||
<table> | ||
<thead | ||
aria-label="aria-label" | ||
class="testClass1 testClass2 emotion-euiTestCss" | ||
data-test-subj="test subject string" | ||
> | ||
<tr> | ||
<td> | ||
children | ||
</td> | ||
</tr> | ||
</thead> | ||
</table> | ||
`; | ||
|
||
exports[`EuiTableHeader is rendered without <tr> 1`] = ` | ||
<thead> | ||
<tr> | ||
<td> | ||
children | ||
</td> | ||
</tr> | ||
</thead> | ||
<table> | ||
<thead> | ||
<tr> | ||
<td> | ||
children | ||
</td> | ||
</tr> | ||
</thead> | ||
</table> | ||
`; |
Oops, something went wrong.