Skip to content

Commit

Permalink
Fix frontend-test + prepare v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvaisetroupe committed Apr 23, 2024
1 parent b5321f8 commit edbbba8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.mauvaisetroupe.eadesignit</groupId>
<artifactId>ea-design-it</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
<packaging>jar</packaging>
<name>EA Design It</name>
<description>Description for EA Design It</description>
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/app/shared/alert/alert.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ describe('Alert Service test suite', () => {
message,
},
};

const expectedMessage =
'Server responded with a status of 500 (Internal Server Error). Please consult browser console errors to report a bug';
// WHEN
alertService.showHttpError(httpErrorResponse);

// THEN
expect(toastStub).toBeCalledTimes(1);
expect(toastStub).toBeCalledWith(message, {
expect(toastStub).toBeCalledWith(expectedMessage, {
toaster: 'b-toaster-top-center',
title: 'Error',
variant: 'danger',
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/app/shared/config/axios-interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ const setupAxiosInterceptors = (onUnauthenticated, onServerError) => {
const status = err.status || err.response.status;
if (status === 403 || status === 401) {
onUnauthenticated(err);
} else if (status >= 500) {
onServerError(err);
} else {
}
if (status >= 500) {
onServerError(err);
}
return Promise.reject(err);
Expand Down

0 comments on commit edbbba8

Please sign in to comment.