-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#IOPID-1148] Add login type opt-in to audit log data (#1078)
- Loading branch information
Showing
11 changed files
with
166 additions
and
66 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { LoginTypeEnum, getLoginType } from "../fastLogin"; | ||
|
||
describe("fastLogin|>getIsUserElegibleForfastLogin", () => { | ||
it.each` | ||
loginType | isUserElegibleForFastLogin | expectedResult | ||
${undefined} | ${false} | ${LoginTypeEnum.LEGACY} | ||
${undefined} | ${true} | ${LoginTypeEnum.LEGACY} | ||
${LoginTypeEnum.LEGACY} | ${false} | ${LoginTypeEnum.LEGACY} | ||
${LoginTypeEnum.LEGACY} | ${true} | ${LoginTypeEnum.LEGACY} | ||
${LoginTypeEnum.LV} | ${false} | ${LoginTypeEnum.LEGACY} | ||
${LoginTypeEnum.LV} | ${true} | ${LoginTypeEnum.LV} | ||
`( | ||
"should return $expectedResult when loginType is $loginType, user is eligible for fast-login $isUserEligibleForFastLogin and lollipop is enabled", | ||
async ({ loginType, isUserElegibleForFastLogin, expectedResult }) => { | ||
const result = getLoginType(loginType, isUserElegibleForFastLogin, true); | ||
|
||
expect(result).toEqual(expectedResult); | ||
} | ||
); | ||
|
||
it.each` | ||
loginType | isUserElegibleForFastLogin | ||
${undefined} | ${false} | ||
${undefined} | ${true} | ||
${LoginTypeEnum.LEGACY} | ${false} | ||
${LoginTypeEnum.LEGACY} | ${true} | ||
${LoginTypeEnum.LV} | ${false} | ||
${LoginTypeEnum.LV} | ${true} | ||
`( | ||
"should return LoginTypeEnum.LEGACY when loginType is $loginType, user is eligible for fast-login $isUserEligibleForFastLogin and lollipop is NOT enabled", | ||
async ({ loginType, isUserElegibleForFastLogin }) => { | ||
const result = getLoginType(loginType, isUserElegibleForFastLogin, false); | ||
|
||
expect(result).toEqual(LoginTypeEnum.LEGACY); | ||
} | ||
); | ||
}); |
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
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
Oops, something went wrong.