mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Merge pull request #154 from Haocen/151
Fix an inaccurate variable name in test
This commit is contained in:
commit
99475fc311
1 changed files with 7 additions and 7 deletions
|
@ -84,7 +84,7 @@ describe('<ShortUrlsList />', () => {
|
||||||
|
|
||||||
for (const sortableField of Object.getOwnPropertyNames(SORTABLE_FIELDS)) {
|
for (const sortableField of Object.getOwnPropertyNames(SORTABLE_FIELDS)) {
|
||||||
wrapper.setState({ orderField: sortableField, orderDir: undefined });
|
wrapper.setState({ orderField: sortableField, orderDir: undefined });
|
||||||
const [ dateCreatedThElement ] = wrapper.find('table').shallow()
|
const [ sortableThElement ] = wrapper.find('table').shallow()
|
||||||
.find('thead').shallow()
|
.find('thead').shallow()
|
||||||
.find('tr').shallow()
|
.find('tr').shallow()
|
||||||
.find('th')
|
.find('th')
|
||||||
|
@ -93,13 +93,13 @@ describe('<ShortUrlsList />', () => {
|
||||||
e.text().includes(SORTABLE_FIELDS[sortableField])
|
e.text().includes(SORTABLE_FIELDS[sortableField])
|
||||||
);
|
);
|
||||||
|
|
||||||
const dateCreatedThElementWrapper = shallow(dateCreatedThElement);
|
const sortableThElementWrapper = shallow(sortableThElement);
|
||||||
|
|
||||||
expect(dateCreatedThElementWrapper.find(FontAwesomeIcon)).toHaveLength(0);
|
expect(sortableThElementWrapper.find(FontAwesomeIcon)).toHaveLength(0);
|
||||||
|
|
||||||
for (const orderDir of Object.getOwnPropertyNames(orderDirOptionToIconMap)) {
|
for (const orderDir of Object.getOwnPropertyNames(orderDirOptionToIconMap)) {
|
||||||
wrapper.setState({ orderField: sortableField, orderDir });
|
wrapper.setState({ orderField: sortableField, orderDir });
|
||||||
const [ dateCreatedThElement ] = wrapper.find('table').shallow()
|
const [ sortableThElement ] = wrapper.find('table').shallow()
|
||||||
.find('thead').shallow()
|
.find('thead').shallow()
|
||||||
.find('tr').shallow()
|
.find('tr').shallow()
|
||||||
.find('th')
|
.find('th')
|
||||||
|
@ -108,11 +108,11 @@ describe('<ShortUrlsList />', () => {
|
||||||
e.text().includes(SORTABLE_FIELDS[sortableField])
|
e.text().includes(SORTABLE_FIELDS[sortableField])
|
||||||
);
|
);
|
||||||
|
|
||||||
const dateCreatedThElementWrapper = shallow(dateCreatedThElement);
|
const sortableThElementWrapper = shallow(sortableThElement);
|
||||||
|
|
||||||
expect(dateCreatedThElementWrapper.find(FontAwesomeIcon)).toHaveLength(1);
|
expect(sortableThElementWrapper.find(FontAwesomeIcon)).toHaveLength(1);
|
||||||
expect(
|
expect(
|
||||||
dateCreatedThElementWrapper.find(FontAwesomeIcon).prop('icon')
|
sortableThElementWrapper.find(FontAwesomeIcon).prop('icon')
|
||||||
).toEqual(orderDirOptionToIconMap[orderDir]);
|
).toEqual(orderDirOptionToIconMap[orderDir]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue