Skip to content

Commit

Permalink
Merge 3648fd5 into 08ecd18
Browse files Browse the repository at this point in the history
  • Loading branch information
didasmbalanya committed Dec 13, 2019
2 parents 08ecd18 + 3648fd5 commit 134d2cd
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,5 @@ It correctly bundles the app in production mode and optimizes the build for the
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### Dev Notice:
**Package installation:** All package have been installed using npm thus the same is recommended and not yarn.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Barefoot Nomad Frontend"
/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
<link rel="apple-touch-icon" href="barefoot-logo.png" />
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/redux/actions/RequestActions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,5 @@ describe("Most visited and trips stats Actions", () => {
const calledActions = store.getActions();
expect(calledActions.length).toEqual(0);
});

});
19 changes: 19 additions & 0 deletions src/__tests__/redux/actions/rateAction.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,23 @@ describe("Rate in actions", () => {
await store.dispatch(getRate(1));
const calledActions = store.getActions();
});

it("should not get average ratings of an accomodation if network error", async () => {
moxios.wait(async () => {
const request = moxios.requests.mostRecent();
request.reject({
status: 400,
error:'error',
response: {
status: 200,
message: "Successfully registered in",
data: {},
},
});
await flushPromises();
});

await store.dispatch(getRate(1));
const calledActions = store.getActions();
});
});
3 changes: 3 additions & 0 deletions src/components/notification/notificationPane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export class NotificationPane extends Component {
});
}
}
componentWillUnmount() {
if (socket )socket.close()
}

render() {
const {
Expand Down
1 change: 0 additions & 1 deletion src/redux/actions/accommodatinsAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const getAllLocations = () => async dispatch => {
payload: locations.data
});
} catch (error) {
console.log(error);
}
};

Expand Down
1 change: 0 additions & 1 deletion src/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function register(config) {
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}

Expand Down

0 comments on commit 134d2cd

Please sign in to comment.