-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Replace the string 'coggnitoClientId' with the actual env in saga
- Loading branch information
1 parent
27f278a
commit ac5c78b
Showing
6 changed files
with
12 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: '[email protected]', | ||
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: '[email protected]', | ||
cognitoClientId: 'cognitoClientId', | ||
cognitoClientId: process.env.COGNITO_CLIENT_ID_MARKETPLACE || '', | ||
}), | ||
) | ||
expect(clone.next('FAIL').value).toEqual( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.