Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinorland committed Aug 10, 2018
1 parent fa6b137 commit eea8793
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 160 deletions.
168 changes: 105 additions & 63 deletions components/array-object-table/src/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ArrayObjectTable matches snapshot 1`] = `
.emotion-14 {
margin-bottom: 15px;
}
@media only screen and (min-width:641px) {
.emotion-14 {
margin-bottom: 15px;
}
}
.emotion-12 {
display: table;
font-family: "nta",Arial,sans-serif;
width: 100%;
table-layout: fixed;
margin-bottom: 15px;
}
@media only screen and (min-width:641px) {
.emotion-12 {
margin-bottom: 15px;
}
}
.emotion-0 {
Expand Down Expand Up @@ -73,7 +90,7 @@ exports[`ArrayObjectTable matches snapshot 1`] = `
skipEmptyRows={true}
title={null}
>
<Table
<Styled(Table)
flexibleColumns={false}
nameByRow={false}
names={Array []}
Expand All @@ -95,78 +112,103 @@ exports[`ArrayObjectTable matches snapshot 1`] = `
]
}
>
<TableContainer
<Table
className="emotion-14"
flexibleColumns={false}
nameByRow={false}
names={Array []}
rowIncludesHeading={false}
rows={
Array [
Array [
"test",
"two",
"-",
],
]
}
titles={
Array [
"One",
"Two",
"Three",
]
}
>
<table
className="emotion-12 emotion-13"
<TableContainer
className="emotion-14"
flexibleColumns={false}
>
<thead>
<tr>
<TableHeading
key="0"
>
<th
className="emotion-0 emotion-1"
<table
className="emotion-12 emotion-13"
>
<thead>
<tr>
<TableHeading
key="0"
>
One
</th>
</TableHeading>
<TableHeading
key="1"
>
<th
className="emotion-0 emotion-1"
<th
className="emotion-0 emotion-1"
>
One
</th>
</TableHeading>
<TableHeading
key="1"
>
Two
</th>
</TableHeading>
<TableHeading
key="2"
>
<th
className="emotion-0 emotion-1"
<th
className="emotion-0 emotion-1"
>
Two
</th>
</TableHeading>
<TableHeading
key="2"
>
Three
</th>
</TableHeading>
</tr>
</thead>
<tbody>
<tr
key="0"
>
<TableData
<th
className="emotion-0 emotion-1"
>
Three
</th>
</TableHeading>
</tr>
</thead>
<tbody>
<tr
key="0"
>
<td
className="emotion-6 emotion-7"
<TableData
key="0"
>
test
</td>
</TableData>
<TableData
key="1"
>
<td
className="emotion-6 emotion-7"
<td
className="emotion-6 emotion-7"
>
test
</td>
</TableData>
<TableData
key="1"
>
two
</td>
</TableData>
<TableData
key="2"
>
<td
className="emotion-6 emotion-7"
<td
className="emotion-6 emotion-7"
>
two
</td>
</TableData>
<TableData
key="2"
>
-
</td>
</TableData>
</tr>
</tbody>
</table>
</TableContainer>
</Table>
<td
className="emotion-6 emotion-7"
>
-
</td>
</TableData>
</tr>
</tbody>
</table>
</TableContainer>
</Table>
</Styled(Table)>
</ArrayObjectTable>
`;
4 changes: 2 additions & 2 deletions components/array-object-table/src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ describe('ArrayObjectTable', () => {

describe('renders table data', () => {
it('renders expected table heading cells ', () => {
const wrapper = shallow(<ArrayObjectTable fields={fields} array={array} />);
const wrapper = mount(<ArrayObjectTable fields={fields} array={array} />);
const titles = wrapper.find('Table').prop('titles');
expect(titles).toEqual(['One', 'Two', 'Three']);
});

it('renders expected table data cells', () => {
const wrapper = shallow(<ArrayObjectTable fields={fields} array={array} />);
const wrapper = mount(<ArrayObjectTable fields={fields} array={array} />);
expect(getRows(wrapper)).toEqual([['-', 'two', '-'], ['test', 'two', '-']]);
});
});
Expand Down
Loading

0 comments on commit eea8793

Please sign in to comment.