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
describe('Unit Test - Login Sagas', () => { | |
describe('userLoginSagaRefactor', () => { | |
describe('when user is authorised', () => { | |
it('should yield userLoginSagaRefactor saga, which yields getLoginFormState, yield authoriseUser yield LoginActions.clearLogin and yield getUserSettingsSaga', () => { | |
const generator = userLoginSagaRefactor(); | |
expect(generator.next().value).toEqual(select(getLoginFormState)); | |
expect( | |
generator.next({ |
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
/** | |
* Authorise user | |
* @param username | |
* @param password | |
*/ | |
export function* authoriseUserSaga(username, password) { | |
try { | |
// call login Api endpoint with user username and password | |
const loginService = new LoginService(); | |
const response = yield call([loginService, get, username, password]); |
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
/** | |
* Before Refactor - user login proccess | |
* @see https://blog.mfbproject.co.za | |
*/ | |
export function* userLoginSaga() { | |
// 1. get the username and password from state. | |
const { username, password } = yield select(getLoginFormState); | |
// 2. call login API endpoint with the username and password |
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
<# .SYNOPSIS | |
create-web-application - Automatic website creation. | |
.DESCRIPTION | |
Allows you to create a website and its ApplicationPool. | |
.NOTES | |
File Name : create-web-application.ps1 | |
Author : Muzikayise Flynn Buthelezi - muzi@mfbproject.co.za | |
Copyright : MFBproject mfbproject.co.za | |
.EXAMPLE | |
PS D:\>create-web-application.ps1 -SiteName TESTSITE -Port 8080 -Environment PREPROD -Runtime v4.0 -Pipeline Classic |
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
#!/bin/bash | |
clear | |
echo "webstorm or rubymine keyboard input reset" | |
ibus restart | |
echo "done" |