Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions __tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`react-handler should contain the Handler-Component 1`] = `[Function]`;

exports[`react-handler should contain the SupHandler´s 1`] = `
Expand Down
11 changes: 8 additions & 3 deletions __tests__/components/__snapshots__/EmptyHandler-test.js.snap
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EmptyHandler should return null when called without Component and is not empty 1`] = `null`;

exports[`EmptyHandler should return the EmptyComponent, when the list is empty and called with EmptyComponent 1`] = `
<h2
className="empty">
className="empty"
>
no results found
</h2>
`;

exports[`EmptyHandler should return the EmptyMessage, when called without checkedProperty 1`] = `
<div
className="handler--empty">
className="handler--empty"
>
no results found
</div>
`;

exports[`EmptyHandler should return the EmptyMessage, when the list is empty 1`] = `
<div
className="handler--empty">
className="handler--empty"
>
no results found
</div>
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ErrorEmptyHandler should display the Component 1`] = `
<div>
Test
Expand All @@ -6,14 +8,16 @@ exports[`ErrorEmptyHandler should display the Component 1`] = `

exports[`ErrorEmptyHandler should display the empty-message 1`] = `
<div
className="handler--empty">
className="handler--empty"
>
0 Articles found
</div>
`;

exports[`ErrorEmptyHandler should display the error-message 1`] = `
<div
className="handler--error">
className="handler--error"
>
failed to load articles
</div>
`;
8 changes: 6 additions & 2 deletions __tests__/components/__snapshots__/ErrorHandler-test.js.snap
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ErrorHandler should return null when called without errorMessage and component 1`] = `null`;

exports[`ErrorHandler should return the ErrorComponent 1`] = `
<h2
className="error">
className="error"
>
failed to call api
</h2>
`;

exports[`ErrorHandler should return the ErrorMessage when called without ErrorComponent 1`] = `
<div
className="handler--error">
className="handler--error"
>
failed to call api
</div>
`;
Expand Down
17 changes: 12 additions & 5 deletions __tests__/components/__snapshots__/Handler-test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Handler should only return the Component, when loading and showComponentWhileLoading is false 1`] = `
<div
className="handler">
className="handler"
>
<div>
Test
</div>
Expand All @@ -9,19 +12,23 @@ exports[`Handler should only return the Component, when loading and showComponen

exports[`Handler should only return the loading-message, wen showComponentWhileLoading is false 1`] = `
<div
className="handler">
className="handler"
>
<div
className="handler--loading">
className="handler--loading"
>
loading...
</div>
</div>
`;

exports[`Handler should return the loading-message and the component 1`] = `
<div
className="handler">
className="handler"
>
<div
className="handler--loading">
className="handler--loading"
>
loading...
</div>
<div>
Expand Down
11 changes: 8 additions & 3 deletions __tests__/components/__snapshots__/LoadingHandler-test.js.snap
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`LoadingHandler should return null when called with loading false and no component 1`] = `null`;

exports[`LoadingHandler should return the LoadingComponent 1`] = `
<img
alt="loading..."
src="/img/spinner.svg" />
src="/img/spinner.svg"
/>
`;

exports[`LoadingHandler should return the LoadingMessage when called without LoadingComponent 1`] = `
<div
className="handler--loading">
className="handler--loading"
>
loading...
</div>
`;

exports[`LoadingHandler should return the LoadingMessage with given loading message 1`] = `
<div
className="handler--loading">
className="handler--loading"
>
keep keep loading
</div>
`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.9.0",
"jest": "^18.1.0",
"jest": "^19.0.1",
"react": "^15.4.1",
"react-test-renderer": "^15.4.1",
"rimraf": "^2.5.4",
Expand Down
Loading