diff --git a/packages/marketplace/src/sagas/__tests__/settings.ts b/packages/marketplace/src/sagas/__tests__/settings.ts index 902a664758..26054870a2 100644 --- a/packages/marketplace/src/sagas/__tests__/settings.ts +++ b/packages/marketplace/src/sagas/__tests__/settings.ts @@ -20,9 +20,7 @@ import errorMessages from '@/constants/error-messages' import messages from '@/constants/messages' import { developerStub } from '../__stubs__/developer' import { removeSession, changePassword } from '@reapit/cognito-auth' -import { history } from '../../core/router' -import Routes from '@/constants/routes' -import { authLogoutSuccess } from '@/actions/auth' +import { authLogout } from '@/actions/auth' import { showNotificationMessage } from '@/actions/notification-message' jest.mock('@reapit/elements') @@ -127,7 +125,7 @@ describe('settings', () => { password: '123', newPassword: '456', userName: 'abc@gmail.com', - cognitoClientId: 'cognitoClientId', + cognitoClientId: process.env.COGNITO_CLIENT_ID_MARKETPLACE || '', }), ) expect(clone.next('SUCCESS').value).toEqual( @@ -139,8 +137,7 @@ describe('settings', () => { ), ) expect(clone.next().value).toEqual(call(removeSession)) - expect(clone.next().value).toEqual(put(authLogoutSuccess())) - expect(clone.next().value).toEqual(history.replace(`${Routes.DEVELOPER_LOGIN}?isChangePasswordSuccess=1`)) + expect(clone.next().value).toEqual(put(authLogout())) expect(clone.next().value).toEqual(put(settingShowLoading(false))) expect(clone.next().done).toEqual(true) }) @@ -152,7 +149,7 @@ describe('settings', () => { password: '123', newPassword: '456', userName: 'abc@gmail.com', - cognitoClientId: 'cognitoClientId', + cognitoClientId: process.env.COGNITO_CLIENT_ID_MARKETPLACE || '', }), ) expect(clone.next('FAIL').value).toEqual( diff --git a/packages/marketplace/src/sagas/settings.ts b/packages/marketplace/src/sagas/settings.ts index 5fe79db17f..c9cdc3d0ca 100644 --- a/packages/marketplace/src/sagas/settings.ts +++ b/packages/marketplace/src/sagas/settings.ts @@ -11,9 +11,7 @@ import { errorThrownServer } from '@/actions/error' import { showNotificationMessage } from '@/actions/notification-message' import { DeveloperModel } from '@reapit/foundations-ts-definitions' import { selectDeveloperId, selectDeveloperEmail } from '@/selector/developer' -import { authLogoutSuccess } from '@/actions/auth' -import Routes from '@/constants/routes' -import { history } from '../core/router' +import { authLogout } from '@/actions/auth' import { logger } from 'logger' export const fetchDeveloperInfo = async (developerId: string | null | undefined) => { @@ -108,11 +106,12 @@ export const developerPasswordChange = function*({ data }: Action Coverage:branchesCoverage:branches70.44%70.44% \ No newline at end of file + Coverage:branchesCoverage:branches70.33%70.33% \ No newline at end of file diff --git a/packages/marketplace/src/tests/badges/badge-functions.svg b/packages/marketplace/src/tests/badges/badge-functions.svg index 3a4a5ae7d6..705469c2f5 100644 --- a/packages/marketplace/src/tests/badges/badge-functions.svg +++ b/packages/marketplace/src/tests/badges/badge-functions.svg @@ -1 +1 @@ - Coverage:functionsCoverage:functions73.68%73.68% \ No newline at end of file + Coverage:functionsCoverage:functions73.99%73.99% \ No newline at end of file diff --git a/packages/marketplace/src/tests/badges/badge-lines.svg b/packages/marketplace/src/tests/badges/badge-lines.svg index 408ba25be3..ca5fc4af90 100644 --- a/packages/marketplace/src/tests/badges/badge-lines.svg +++ b/packages/marketplace/src/tests/badges/badge-lines.svg @@ -1 +1 @@ - Coverage:linesCoverage:lines90.34%90.34% \ No newline at end of file + Coverage:linesCoverage:lines90.39%90.39% \ No newline at end of file diff --git a/packages/marketplace/src/tests/badges/badge-statements.svg b/packages/marketplace/src/tests/badges/badge-statements.svg index c90015f145..80713dab5d 100644 --- a/packages/marketplace/src/tests/badges/badge-statements.svg +++ b/packages/marketplace/src/tests/badges/badge-statements.svg @@ -1 +1 @@ - Coverage:statementsCoverage:statements89.51%89.51% \ No newline at end of file + Coverage:statementsCoverage:statements89.56%89.56% \ No newline at end of file