-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e02582
commit 4af4485
Showing
2 changed files
with
85 additions
and
155 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
216 changes: 72 additions & 144 deletions
216
packages/react/src/components/DataTable/__tests__/__snapshots__/TableHeader-test.js.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,177 +1,105 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataTable.TableHeader should have an active and ascending class if sorting by ASC 1`] = ` | ||
<Table | ||
isSortable={false} | ||
overflowMenuOnHover={true} | ||
> | ||
exports[`TableHeader should have an active and ascending class if sorting by ASC 1`] = ` | ||
<div> | ||
<div | ||
className="cds--data-table-content" | ||
class="cds--data-table-content" | ||
> | ||
<table | ||
aria-describedby={null} | ||
aria-labelledby={null} | ||
className="cds--data-table" | ||
class="cds--data-table" | ||
> | ||
<TableHead> | ||
<thead> | ||
<TableRow> | ||
<tr> | ||
<TableHeader | ||
isSortHeader={true} | ||
isSortable={false} | ||
onClick={[MockFunction]} | ||
scope="col" | ||
sortDirection="ASC" | ||
translateWithId={[Function]} | ||
> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
className="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</TableHeader> | ||
</tr> | ||
</TableRow> | ||
</thead> | ||
</TableHead> | ||
<thead> | ||
<tr> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
class="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
</Table> | ||
</div> | ||
`; | ||
|
||
exports[`DataTable.TableHeader should have an active class if it is the sort header and the sort state is not NONE 1`] = ` | ||
<Table | ||
isSortable={false} | ||
overflowMenuOnHover={true} | ||
> | ||
exports[`TableHeader should have an active class if it is the sort header and the sort state is not NONE 1`] = ` | ||
<div> | ||
<div | ||
className="cds--data-table-content" | ||
class="cds--data-table-content" | ||
> | ||
<table | ||
aria-describedby={null} | ||
aria-labelledby={null} | ||
className="cds--data-table" | ||
class="cds--data-table" | ||
> | ||
<TableHead> | ||
<thead> | ||
<TableRow> | ||
<tr> | ||
<TableHeader | ||
isSortHeader={true} | ||
isSortable={false} | ||
onClick={[MockFunction]} | ||
scope="col" | ||
sortDirection="NONE" | ||
translateWithId={[Function]} | ||
> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
className="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</TableHeader> | ||
</tr> | ||
</TableRow> | ||
</thead> | ||
</TableHead> | ||
<thead> | ||
<tr> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
class="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
</Table> | ||
</div> | ||
`; | ||
|
||
exports[`DataTable.TableHeader should render 1`] = ` | ||
<Table | ||
isSortable={false} | ||
overflowMenuOnHover={true} | ||
> | ||
exports[`TableHeader should render 1`] = ` | ||
<div> | ||
<div | ||
className="cds--data-table-content" | ||
class="cds--data-table-content" | ||
> | ||
<table | ||
aria-describedby={null} | ||
aria-labelledby={null} | ||
className="cds--data-table" | ||
class="cds--data-table" | ||
> | ||
<TableHead> | ||
<thead> | ||
<TableRow> | ||
<tr> | ||
<TableHeader | ||
isSortHeader={false} | ||
isSortable={false} | ||
onClick={[MockFunction]} | ||
scope="col" | ||
sortDirection="NONE" | ||
translateWithId={[Function]} | ||
> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
className="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</TableHeader> | ||
</tr> | ||
</TableRow> | ||
</thead> | ||
</TableHead> | ||
<thead> | ||
<tr> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
class="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
</Table> | ||
</div> | ||
`; | ||
|
||
exports[`DataTable.TableHeader should render 2`] = ` | ||
<Table | ||
isSortable={false} | ||
overflowMenuOnHover={true} | ||
> | ||
exports[`TableHeader should render with sortHeader 1`] = ` | ||
<div> | ||
<div | ||
className="cds--data-table-content" | ||
class="cds--data-table-content" | ||
> | ||
<table | ||
aria-describedby={null} | ||
aria-labelledby={null} | ||
className="cds--data-table" | ||
class="cds--data-table" | ||
> | ||
<TableHead> | ||
<thead> | ||
<TableRow> | ||
<tr> | ||
<TableHeader | ||
isSortHeader={true} | ||
isSortable={false} | ||
onClick={[MockFunction]} | ||
scope="col" | ||
sortDirection="NONE" | ||
translateWithId={[Function]} | ||
> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
className="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</TableHeader> | ||
</tr> | ||
</TableRow> | ||
</thead> | ||
</TableHead> | ||
<thead> | ||
<tr> | ||
<th | ||
scope="col" | ||
> | ||
<div | ||
class="cds--table-header-label" | ||
> | ||
Header | ||
</div> | ||
</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
</Table> | ||
</div> | ||
`; |