Skip to content

Commit

Permalink
add without data fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Oct 29, 2019
1 parent af7ff7a commit c63b39c
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/FixedColumn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Table.FixedColumn', () => {

act(() => {
wrapper
.find('tbody ResizeObserver')
.find('table ResizeObserver')
.first()
.props()
.onResize({ width: 93 });
Expand Down
146 changes: 145 additions & 1 deletion tests/__snapshots__/FixedColumn.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Table.FixedColumn renders correctly 1`] = `
exports[`Table.FixedColumn renders correctly with data 1`] = `
<div
class="rc-table rc-table-fixed-column"
>
Expand Down Expand Up @@ -587,3 +587,147 @@ exports[`Table.FixedColumn renders correctly 1`] = `
</div>
</div>
`;

exports[`Table.FixedColumn renders correctly without data 1`] = `
<div
class="rc-table rc-table-fixed-column"
>
<div
class="rc-table-content"
style="overflow-x: scroll;"
>
<table
style="width: 1200px; min-width: 100%; table-layout: fixed;"
>
<colgroup>
<col
style="width: 100px; min-width: 100px;"
/>
<col
style="width: 100px; min-width: 100px;"
/>
<col />
<col />
<col />
<col />
<col />
<col />
<col />
<col />
<col />
<col
style="width: 100px; min-width: 100px;"
/>
</colgroup>
<thead>
<tr>
<th
class="rc-table-cell rc-table-cell-fix-left"
colspan="1"
rowspan="1"
style="position: sticky; left: 0px;"
>
title1
</th>
<th
class="rc-table-cell rc-table-cell-fix-left rc-table-cell-fix-left-last"
colspan="1"
rowspan="1"
style="position: sticky; left: 93px;"
>
title2
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title3
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title4
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title5
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title6
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title7
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title8
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title9
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title10
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
title11
</th>
<th
class="rc-table-cell rc-table-cell-fix-right rc-table-cell-fix-right-first"
colspan="1"
rowspan="1"
style="position: sticky; right: 0px;"
>
title12
</th>
</tr>
</thead>
<tbody>
<tr
class="rc-table-placeholder"
>
<td
class="rc-table-cell"
colspan="12"
>
<div
class="rc-table-expanded-row-fixed"
style="width: 0px; position: sticky; left: 0px; overflow: hidden;"
>
No Data
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
`;

0 comments on commit c63b39c

Please sign in to comment.